rc5

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: MIT Imports: 5 Imported by: 0

README

rc5

ci

rc5 implementation

Documentation

Overview

Package rc5 handle rc5 symmetric encryption algorithm

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