Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Expose secretbox's Overhead const here for convenience. Overhead = secretbox.Overhead KeySize = 32 NonceSize = 24 DefaultN = 16384 // 2^14 DefaultR = 8 DefaultP = 1 )
Various constants needed for encryption scheme.
Variables ¶
View Source
var ( ErrInvalidPassword = errors.New("invalid password") ErrMalformed = errors.New("malformed data") ErrDecryptFailed = errors.New("unable to decrypt") )
Error types and messages.
Functions ¶
This section is empty.
Types ¶
type CryptoKey ¶
func GenerateCryptoKey ¶
GenerateCryptoKey generates a new crypotgraphically random key.
type Parameters ¶
type SecretKey ¶
type SecretKey struct { Key *CryptoKey Parameters Parameters }
func NewSecretKey ¶
NewSecretKey returns a SecretKey structure based on the passed parameters.
Click to show internal directories.
Click to hide internal directories.