rc5

package
v1.0.2031 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

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

func NewCipher(key []byte, wordSize, r uint) (cipher.Block, error)

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 NewCipher32

func NewCipher32(key []byte, r uint) (cipher.Block, error)

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.

func NewCipher64

func NewCipher64(key []byte, r uint) (cipher.Block, error)

NewCipher64 creates and returns a new cipher.Block with 64 bits word size. The key argument should be the RC5 key, the r argument should be number of rounds.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL