age

package
v1.19.31-hako.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const FileHeader = armor.Header

Variables

This section is empty.

Functions

func DecryptBytes

func DecryptBytes(data []byte, secretKeys ...string) ([]byte, error)

DecryptBytes decrypt age armor format encrypted data if not the age armor format, return original data

func EncryptBytes

func EncryptBytes(data []byte, publicKeys ...string) ([]byte, error)

EncryptBytes encrypt data with age armor format

func GenHybridKeyPair

func GenHybridKeyPair() (secretKey string, publicKey string, err error)

GenHybridKeyPair generate mlkem768-x25519 hybrid post-quantum recipient type age-secret-key and age-public-key

func GenX25519KeyPair

func GenX25519KeyPair() (secretKey string, publicKey string, err error)

GenX25519KeyPair generate x25519 recipient type age-secret-key and age-public-key

func Main

func Main(args []string)

func SetGlobalSecretKeys

func SetGlobalSecretKeys(secretKeys ...string)

SetGlobalSecretKeys set global secret keys, which will be used when decrypting

func ToPublicKeys

func ToPublicKeys(secretKeys ...string) (publicKeys []string, err error)

ToPublicKeys convert age-secret-key to age-public-key

func VerityPublicKeys

func VerityPublicKeys(publicKeys ...string) error

VerityPublicKeys check if the public key is valid

func VeritySecretKeys

func VeritySecretKeys(secretKeys ...string) error

VeritySecretKeys check if the secret key is valid

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL