crypto

package
v0.0.0-...-24d9d29 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PBKDF2Rounds = 4096
	KeyLength    = 32
)

Variables

View Source
var ErrAuthenticationFailed = errors.New("cipher: message authentication failed")

Functions

func CBCDecrypt

func CBCDecrypt(key []byte, ciphertext []byte) ([]byte, error)

func CBCEncrypt

func CBCEncrypt(key []byte, plaintext []byte) ([]byte, error)

func CombinePasswordAndKey

func CombinePasswordAndKey(pass, key []byte) ([]byte, error)

func GCMDecrypt

func GCMDecrypt(key []byte, ciphertext []byte) ([]byte, error)

func GCMEncrypt

func GCMEncrypt(key []byte, plaintext []byte) ([]byte, error)

func GeneratePBKDF2Key

func GeneratePBKDF2Key(password, salt []byte) []byte

func GeneratePassword

func GeneratePassword(length int, numbers, specials bool) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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