encryption

package
Version: v0.0.0-...-9fa4df0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 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

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL