crypto

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2019 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hmac512

func Hmac512(key string, data io.Reader) (b64 string, err error)

Hmac512 ciphers the data extracted from the Reader and returns a b64 encoded string of a SHA512 hash.

func NewPassword

func NewPassword(len int) string

func NewToken added in v0.3.0

func NewToken(len int, isTest bool) string

Types

type Crypter

type Crypter interface {
	Encrypt(plainText []byte) (cipherText []byte, err error)
	Decrypt(cipherText []byte) (plainText []byte, err error)
}

Crypter defines the methods for encryption and decryption of data.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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