Documentation ¶
Index ¶
Constants ¶
View Source
const (
TagSize = 16
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AesContentCipher ¶
type AesContentCipher struct { NonceGenerator keygen.Generator // contains filtered or unexported fields }
AesContentCipher represents a cipher based on AES
func NewAES ¶
func NewAES(alg jwa.ContentEncryptionAlgorithm) (*AesContentCipher, error)
func (AesContentCipher) Decrypt ¶
func (c AesContentCipher) Decrypt(cek, iv, ciphertxt, tag, aad []byte) (plaintext []byte, err error)
func (AesContentCipher) Encrypt ¶
func (c AesContentCipher) Encrypt(cek, plaintext, aad []byte) (iv, ciphertxt, tag []byte, err error)
func (AesContentCipher) KeySize ¶
func (c AesContentCipher) KeySize() int
func (AesContentCipher) TagSize ¶
func (c AesContentCipher) TagSize() int
Click to show internal directories.
Click to hide internal directories.