Documentation
¶
Index ¶
- func Decrypt(encrypted []byte, key []byte) (plaintext []byte, err error)
- func DecryptAEAD(encrypted []byte, aead cipher.AEAD) (plaintext []byte, err error)
- func DecryptAEADInPlace(encrypted []byte, aead cipher.AEAD) (plaintext []byte, err error)
- func DecryptChaCha(encryptedMsg []byte, aead cipher.AEAD) (plaintext []byte, err error)
- func Encrypt(plaintext []byte, key []byte) (encrypted []byte, err error)
- func EncryptAEAD(plaintext []byte, aead cipher.AEAD) (encrypted []byte, err error)
- func EncryptAEADTo(dst, plaintext []byte, aead cipher.AEAD) (encrypted []byte, err error)
- func EncryptChaCha(plaintext []byte, aead cipher.AEAD) (encrypted []byte, err error)
- func New(passphrase []byte, usersalt []byte) (key []byte, salt []byte, err error)
- func NewAESGCM(key []byte) (cipher.AEAD, error)
- func NewArgon2(passphrase []byte, usersalt []byte) (aead cipher.AEAD, salt []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptAEAD ¶
DecryptAEAD decrypts data produced by Encrypt or EncryptAEAD using reusable AEAD state.
func DecryptAEADInPlace ¶
DecryptAEADInPlace authenticates and decrypts into the ciphertext portion of encrypted, avoiding a payload-sized allocation in transfer receive loops.
func DecryptChaCha ¶
DecryptChaCha will decrypt ChaCha20-Poly1305 using the pre-generated key https://pkg.go.dev/golang.org/x/crypto/chacha20poly1305
func EncryptAEAD ¶
EncryptAEAD encrypts plaintext with reusable AEAD state. Its wire format is identical to Encrypt: nonce followed by ciphertext and authentication tag.
func EncryptAEADTo ¶
EncryptAEADTo encrypts into dst when it has sufficient capacity, allowing transfer loops to reuse their ciphertext buffer across chunks.
func EncryptChaCha ¶
EncryptChaCha will encrypt ChaCha20-Poly1305 using the pre-generated key https://pkg.go.dev/golang.org/x/crypto/chacha20poly1305
Types ¶
This section is empty.