Documentation ¶
Index ¶
- Variables
- func BackupKey(client api.Client) error
- func CreateKeyFingerprintFile() error
- func Decrypt(prov Provider, text []byte) ([]byte, error)
- func DownloadBackup(client api.Client, name string) error
- func Encrypt(prov Provider, text []byte) ([]byte, error)
- func Flush(prov Provider) error
- func GetKeyID() (string, error)
- func Identity() (*age.X25519Identity, error)
- func RandStr(length int) (string, error)
- func RandString(length int) string
- func RandStringWithCharset(length int, charset string) string
- func Setup(key string) error
- func SetupAge(client api.Client, emails []string) error
- func SetupIdentity(client api.Client, name string) error
- type AESKey
- type Age
- type AgeIdentity
- type AgeProvider
- type Config
- type Context
- type IdentityType
- type KeyConfig
- type KeyProvider
- type KeyValidator
- type Provider
Constants ¶
This section is empty.
Variables ¶
View Source
var EncryptionKeyFile string
Functions ¶
func CreateKeyFingerprintFile ¶
func CreateKeyFingerprintFile() error
func Identity ¶
func Identity() (*age.X25519Identity, error)
func RandString ¶
func RandStringWithCharset ¶
Types ¶
type AgeIdentity ¶
type AgeProvider ¶
type AgeProvider struct { Identity *age.X25519Identity Key *AESKey }
func BuildAgeProvider ¶
func BuildAgeProvider() (prov *AgeProvider, err error)
func (*AgeProvider) ID ¶
func (prov *AgeProvider) ID() string
func (*AgeProvider) Marshall ¶
func (prov *AgeProvider) Marshall() ([]byte, error)
func (*AgeProvider) SymmetricKey ¶
func (prov *AgeProvider) SymmetricKey() ([]byte, error)
type Config ¶
type Config struct { Version string Type IdentityType Id string Context *Context }
func ReadConfig ¶
type IdentityType ¶
type IdentityType string
const ( KEY IdentityType = "key" AGE IdentityType = "age" )
type KeyProvider ¶
type KeyProvider struct {
// contains filtered or unexported fields
}
func (*KeyProvider) ID ¶
func (prov *KeyProvider) ID() string
func (*KeyProvider) Marshall ¶
func (prov *KeyProvider) Marshall() ([]byte, error)
func (*KeyProvider) SymmetricKey ¶
func (prov *KeyProvider) SymmetricKey() ([]byte, error)
type KeyValidator ¶
type KeyValidator struct {
KeyID string
}
func (*KeyValidator) Flush ¶
func (k *KeyValidator) Flush() error
func (*KeyValidator) Marshal ¶
func (k *KeyValidator) Marshal() ([]byte, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.