Documentation
¶
Index ¶
- func DecryptFile(inputPath, outputPath string, identity age.Identity) (err error)
- func DecryptInPlace(filepath string, privatekey age.Identity) error
- func DecryptReader(r io.Reader, w io.Writer, identity age.Identity) error
- func EncryptFile(inputPath, outputPath string, recipients []age.Recipient) (err error)
- func EncryptInPlace(filepath string, recipients []age.Recipient) error
- func EncryptReader(r io.Reader, w io.Writer, recipients []age.Recipient) error
- func LoadPrivateKey(key string) (*age.X25519Identity, error)
- func LoadPublicKey(key string) (*age.X25519Recipient, error)
- func LoadPublicKeys(keys []string) ([]age.Recipient, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptFile ¶
DecryptFile decrypts a file leaving the original. It writes to a temporary file first and renames on success to avoid leaving a partially-written output file on failure.
func DecryptInPlace ¶
DecryptInPlace takes in a file that is assumed to be encrypted and replaces that file with a version that is decrypted in-place. The file left in place is created as <name>.<ext> with the suffix .age now removed from the filename
func DecryptReader ¶
DecryptReader decrypts data from an io.Reader and writes the decrypted result to an io.Writer
func EncryptFile ¶
EncryptFile encrypts a file in place removing the original version. It writes to a temporary file first and renames on success to avoid leaving a partially-written output file on failure.
func EncryptInPlace ¶
EncryptInPlace takes a filepath <name>.<ext>. This file is then replaced with an encrypted version with a new file <name>.<ext>.age. The old file is removed without confirmation and cannot be recovered.
func EncryptReader ¶
EncryptReader encrypts data from an io.Reader and writes the encrypted result to an io.Writer
func LoadPrivateKey ¶
func LoadPrivateKey(key string) (*age.X25519Identity, error)
func LoadPublicKey ¶
func LoadPublicKey(key string) (*age.X25519Recipient, error)
Types ¶
This section is empty.