 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package secrets is an interface for encrypting and decrypting secrets
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DecryptOption ¶
type DecryptOption func(*DecryptOptions)
DecryptOption sets DecryptOptions
func SenderPublicKey ¶
func SenderPublicKey(key []byte) DecryptOption
SenderPublicKey is the Public Key of the Secrets that encrypted this message
type DecryptOptions ¶
type DecryptOptions struct {
	SenderPublicKey []byte
}
    DecryptOptions can be passed to Secrets.Decrypt
type EncryptOption ¶
type EncryptOption func(*EncryptOptions)
EncryptOption Sets EncryptOptions
func RecipientPublicKey ¶
func RecipientPublicKey(key []byte) EncryptOption
RecipientPublicKey is the Public Key of the Secrets that will decrypt this message
type EncryptOptions ¶
type EncryptOptions struct {
	RecipientPublicKey []byte
}
    EncryptOptions can be passed to Secrets.Encrypt
type Option ¶
type Option func(*Options)
Option sets options
func PrivateKey ¶
PrivateKey sets the asymmetric Private Key of this codec
type Secrets ¶
type Secrets interface {
	// Initialise options
	Init(...Option) error
	// Return the options
	Options() Options
	// Decrypt a value
	Decrypt([]byte, ...DecryptOption) ([]byte, error)
	// Encrypt a value
	Encrypt([]byte, ...EncryptOption) ([]byte, error)
	// Secrets implementation
	String() string
}
    Secrets encrypts or decrypts arbitrary data. The data should be as small as possible
       Directories
      ¶
      Directories
      ¶
    
    | Path | Synopsis | 
|---|---|
| Package box is an asymmetric implementation of config/secrets using nacl/box | Package box is an asymmetric implementation of config/secrets using nacl/box | 
| Package secretbox is a config/secrets implementation that uses nacl/secretbox to do symmetric encryption / verification | Package secretbox is a config/secrets implementation that uses nacl/secretbox to do symmetric encryption / verification | 
 Click to show internal directories. 
   Click to hide internal directories.