rc5

package module
v0.0.0-...-a3990de Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2017 License: BSD-4-Clause Imports: 4 Imported by: 0

README

rc5
===

A `golang <https://golang.org/>`_ `rc5 <https://wikipedia.org/wiki/RC5>`_ implementation based on `RFC 2040 <https://www.ietf.org/rfc/rfc2040.txt>`_. 16, 32, 64, and larger word sizes are supported.

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
	P16  = 0xb7e1
	Q16  = 0x9e37
)
View Source
const (
	W32  = 32      // word size in bits
	WW32 = W32 / 8 // word size in bytes
	B32  = 64      // block size in bits
	BB32 = B32 / 8 // block size in bytes
	P32  = 0xb7e15163
	Q32  = 0x9e3779b9
)
View Source
const (
	W64  = 64      // word size in bits
	WW64 = W64 / 8 // word size in bytes
	B64  = 128     // block size in bits
	BB64 = B64 / 8 // block size in bytes
	P64  = 0xb7e151628aed2a6b
	Q64  = 0x9e3779b97f4a7c15
)

Variables

This section is empty.

Functions

func NewCipher

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

func NewCipher16

func NewCipher16(key []byte, rounds uint) (cipher.Block, error)

func NewCipher32

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

func NewCipher64

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

func NewCipherBig

func NewCipherBig(key []byte, rounds uint, wordSize uint) (cipher.Block, error)

Types

type KeySizeError

type KeySizeError int

func (KeySizeError) Error

func (k KeySizeError) Error() string

Jump to

Keyboard shortcuts

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