Imports #
"crypto/internal/fips140/alias"
"crypto/internal/fips140only"
"errors"
"strconv"
"crypto/internal/fips140/alias"
"crypto/internal/fips140only"
"errors"
"strconv"
type KeySizeError intA Cipher is an instance of RC4 using a particular key.
type Cipher struct {
s [256]uint32
i uint8
j uint8
}func (k KeySizeError) Error() stringNewCipher creates and returns a new [Cipher]. The key argument should be the RC4 key, at least 1 byte and at most 256 bytes.
func NewCipher(key []byte) (*Cipher, error)Reset zeros the key data and makes the [Cipher] unusable. Deprecated: Reset can't guarantee that the key will be entirely removed from the process's memory.
func (c *Cipher) Reset()XORKeyStream sets dst to the result of XORing src with the key stream. Dst and src must overlap entirely or not at all.
func (c *Cipher) XORKeyStream(dst []byte, src []byte)Generated with Arrow