Documentation
¶
Index ¶
- func Decrypt(ciffre string, identityAge []age.Identity) (string, error)
- func DecryptFromIdentityFile(ciffre, identityFile string) (string, error)
- func DecryptFromPassword(ciffre, password string) (string, error)
- func DecryptMultipleCommon(enctexts []string, chiffre, identityFile string) ([]string, error)
- func Encrypt(plaintext string, recipients []string) (string, error)
- func EncryptMultipleCommon(plaintexts []string, recipientFile string) ([]string, string, error)
- func EncryptStringWithRecipientFile(plaintext, recipientFile string) (string, error)
- func EncryptWithPassword(plaintext, password string) (string, error)
- func GetRecipientsFromJSONFile(filePath string) (map[string]string, error)
- func NewPlaintextPrivateSecret() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
Decrypt decrypts a string with the given age identities and returns the decrypted string.
func DecryptFromIdentityFile ¶
DecryptFromIdentityFile decrypts a string with the given identity file and returns the decrypted string.
func DecryptFromPassword ¶
DecryptFromPassword decrypts a string with a password and returns the decrypted string.
func DecryptMultipleCommon ¶
DecryptMultipleCommon decrypts multiple strings with a public secret (chiffre) and returns the multiple decrypted strings.
func Encrypt ¶
Encrypt encrypts a string with the given recipients (as strings) and returns the encrypted string.
func EncryptMultipleCommon ¶
EncryptMultipleCommon encrypts multiple strings with a random secret and returns the multiple encrypted strings. The random secret gets encrypted for the recipients defined in the recipientFile (= public secret). Also returns the public secret.
func EncryptStringWithRecipientFile ¶
EncryptStringWithPassword encrypts a string with recipients defined in recipientFile and returns the encrypted string.
func EncryptWithPassword ¶
EncryptWithPassword encrypts a string with a password and returns the encrypted string.
func GetRecipientsFromJSONFile ¶
GetRecipientsFromJSONFile parses a text file into a slice of strings. It ignores keys that are empty or start with "#".
func NewPlaintextPrivateSecret ¶
func NewPlaintextPrivateSecret() string
Types ¶
This section is empty.