Documentation
¶
Index ¶
Constants ¶
View Source
const ( ConfigTypeOpenPGP = "openpgp" ConfigTypeAESGCM = "aes_gcm" ConfigTypeChaChaPoly = "chachapoly" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AESGCMClient ¶
type AESGCMClient struct {
// contains filtered or unexported fields
}
func NewAESGCMClient ¶
func NewAESGCMClient(settings *AESGCMSettings) (*AESGCMClient, error)
type AESGCMSettings ¶
type AESGCMSettings struct {
KeyLen int `json:"keylen,omitempty" toml:"keylen"`
KeyDerivation string `json:"keyderivation,omitempty" toml:"keyderivation"`
PBKDF2 *pbkdf2.PBKDF2 `json:"pbkdf2,omitempty" toml:"pbkdf2"`
Scrypt *scrypt.Scrypt `json:"scrypt,omitempty" toml:"scrypt"`
// Warning: Deprecated. These three Pbkdf2 configs are required for backwards-compatiblity :(
Pbkdf2Hash string `json:"pbkdf2hash,omitempty" toml:"pbkdf2hash"`
Pbkdf2Iterations int `json:"pbkdf2iterations,omitempty" toml:"pbkdf2iterations"`
Pbkdf2SaltLen int `json:"pbkdf2saltlen,omitempty" toml:"pbkdf2saltlen"`
}
func DefaultAESGCMSettings ¶
func DefaultAESGCMSettings() *AESGCMSettings
type AESGCMStore ¶
type ChaCha20Poly1305Client ¶ added in v0.4.0
type ChaCha20Poly1305Client struct {
// contains filtered or unexported fields
}
func NewChaCha20Poly1305Client ¶ added in v0.4.0
func NewChaCha20Poly1305Client(settings *ChaCha20Poly1305Settings) (*ChaCha20Poly1305Client, error)
type ChaCha20Poly1305Settings ¶ added in v0.4.0
type ChaCha20Poly1305Settings struct {
KeyDerivation string `json:"keyderivation,omitempty" toml:"keyderivation"`
PBKDF2 *pbkdf2.PBKDF2 `json:"pbkdf2,omitempty" toml:"pbkdf2"`
Scrypt *scrypt.Scrypt `json:"scrypt,omitempty" toml:"scrypt"`
}
func DefaultChaCha20Poly1305Settings ¶ added in v0.4.0
func DefaultChaCha20Poly1305Settings() *ChaCha20Poly1305Settings
type ChaCha20Poly1305Store ¶ added in v0.4.0
type Client ¶
type Config ¶
type Config struct {
Type string `json:"type" toml:"type"`
*OpenPGPSettings `json:"openpgp,omitempty" toml:"openpgp"`
*AESGCMSettings `json:"aes_gcm,omitempty" toml:"aes_gcm"`
*ChaCha20Poly1305Settings `json:"chachapoly,omitempty" toml:"chachapoly"`
}
func NewDefaultConfig ¶
func NewDefaultConfig() Config
type KeyDerivation ¶
type OpenPGPClient ¶
type OpenPGPClient struct {
// contains filtered or unexported fields
}
func NewOpenPGPClient ¶
func NewOpenPGPClient(settings *OpenPGPSettings) (*OpenPGPClient, error)
type OpenPGPSettings ¶
type OpenPGPSettings struct {
Cipher string `json:"cipher,omitempty" toml:"cipher"`
S2KCount int `json:"s2kcount,omitempty" toml:"s2kcount"`
}
func DefaultOpenPGPSettings ¶
func DefaultOpenPGPSettings() *OpenPGPSettings
Click to show internal directories.
Click to hide internal directories.