encryption

package
v1.8.17 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2018 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const KeyLength = 32

Variables

This section is empty.

Functions

func New

func New(key Key, padding int, initCtr uint32, hashFunc func() hash.Hash) *encryption

New constructs a new encryptor/decryptor

Types

type Encryption

type Encryption interface {
	Encrypt(data []byte) ([]byte, error)
	Decrypt(data []byte) ([]byte, error)
}

type Key

type Key []byte

func GenerateRandomKey

func GenerateRandomKey(l int) Key

GenerateRandomKey generates a random key of length l

Jump to

Keyboard shortcuts

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