Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNonceRead is returned when the provided reader fails to generate a nonce. ErrNonceRead = errors.New("failed to read nonce value") // ErrDecrypt is returned when opening an encrypted message fails. ErrDecrypt = errors.New("failed to decrypt value") )
Functions ¶
This section is empty.
Types ¶
type Box ¶
type Box interface { Seal(message []byte) ([]byte, error) Open(encrypted []byte) ([]byte, error) GetSecretKeySig() string }
Box opens and seals secrets.
type MultiSecretBox ¶
type MultiSecretBox struct {
// contains filtered or unexported fields
}
MultiSecretBox wraps multiple SecretBox.
func NewMultiSecretBox ¶
func NewMultiSecretBox(boxes ...*SecretBox) *MultiSecretBox
NewMultiSecretBox creates a MultiSecretBox which wraps the provided SecretBox.
func (*MultiSecretBox) GetSecretKeySig ¶
func (m *MultiSecretBox) GetSecretKeySig() string
GetSecretKeySig returns the md5 hash sum of the key
type SecretBox ¶
type SecretBox struct {
// contains filtered or unexported fields
}
SecretBox provides nacl secretbox encryption.
func NewSecretBox ¶
NewSecretBox creates a new SecretBox with the provided secret key and optional nonce reader.
func (*SecretBox) GetSecretKeySig ¶
GetSecretKeySig returns the md5 hash sum of the key
type Signer ¶
Signer allows you to sign and verify data.
func NewMultiSigner ¶
NewMultiSigner allows you to create multiple signers which is useful for doing cred rolls.
Click to show internal directories.
Click to hide internal directories.