Documentation ¶
Index ¶
Constants ¶
View Source
const ( KeyLen = 0x10 IVXLen = 0x08 )
Variables ¶
View Source
var ( ErrInvalidKey = errors.New("rabbitio: rabbit key must be exactly 16 byte len") ErrInvalidIVX = errors.New("rabbitio: rabbit iv must be either 8 or zero byte len") )
Functions ¶
func NewCipher ¶
NewCipher returns a chpher.Stream interface that implemented an XORKeyStream method according to RFC 4503, key must be 16 byte len, iv on the other hand is optional but must be either zero len or 8 byte len, error will be returned on wrong key/iv len
func NewReaderCipher ¶
NewWriterCipher warp a rabbit cipher stream with an io.Reader, returned StreamReader interface which can be used to encrypt or decrypting data
func NewWriterCipher ¶
NewWriterCipher warp a rabbit cipher stream with an io.Writer, returned StreamWriter interface which can be used to encrypt or decrypting data
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.