package
0.0.0-20200321091321-bc8cfc345e21
Repository: https://github.com/wuka1/swarmkit.git
Documentation: pkg.go.dev

# Functions

Decrypt turns a slice of bytes serialized as an MaybeEncryptedRecord into a slice of plaintext bytes.
Defaults returns a default encrypter and decrypter.
Encrypt turns a slice of bytes into a serialized MaybeEncryptedRecord slice of bytes.
GenerateSecretKey generates a secret key that can be used for encrypting data using this package.
HumanReadableKey displays a secret key in a human readable way.
NewFernet returns a new Fernet encrypter/decrypter with the given key.
NewMultiDecrypter returns a new MultiDecrypter given multiple Decrypters.
NewNACLSecretbox returns a new NACL secretbox encrypter/decrypter with the given key.
ParseHumanReadableKey returns a key as bytes from recognized serializations of said keys.

# Variables

NoopCrypter is just a pass-through crypter - it does not actually encrypt or decrypt any data.

# Structs

ErrCannotDecrypt is the type of error returned when some data cannot be decryptd as plaintext.
Fernet wraps the `fernet` library as an implementation of encrypter/decrypter.
MultiDecrypter is a decrypter that will attempt to decrypt with multiple decrypters.
NACLSecretbox is an implementation of an encrypter/decrypter.

# Interfaces

A Decrypter can decrypt an encrypted record.
A Encrypter can encrypt some bytes into an encrypted record.