Documentation ¶
Index ¶
Constants ¶
View Source
const ( W16 = 16 // word size in bits WW16 = W16 / 8 // word size in bytes B16 = 32 // block size in bits BB16 = B16 / 8 // block size in bytes // BlockSize the RC5/16 block size in bytes. BlockSize16 = BB16 P16 = 0xb7e1 Q16 = 0x9e37 )
View Source
const ( // BlockSize the RC5/32 block size in bytes. BlockSize32 = 8 P32 = 0xB7E15163 Q32 = 0x9E3779B9 )
View Source
const ( // BlockSize the RC5/64 block size in bytes. BlockSize64 = 16 P64 = 0xB7E151628AED2A6B Q64 = 0x9E3779B97F4A7C15 )
Variables ¶
This section is empty.
Functions ¶
func NewCipher ¶
NewCipher creates and returns a new cipher.Block. The key argument should be the RC5 key, the wordSize arguement should be word size in bits, the r argument should be number of rounds.
func NewCipher16 ¶ added in v1.0.2033
NewCipher16 creates and returns a new cipher.Block with 16 bits word size. The key argument should be the RC5 key, the r argument should be number of rounds.
func NewCipher32 ¶
NewCipher32 creates and returns a new cipher.Block with 32 bits word size. The key argument should be the RC5 key, the r argument should be number of rounds.
Types ¶
type KeySizeError ¶ added in v1.0.2033
type KeySizeError int
KeySizeError
func (KeySizeError) Error ¶ added in v1.0.2033
func (k KeySizeError) Error() string
Click to show internal directories.
Click to hide internal directories.