Versions in this module Expand all Collapse all v0 v0.0.1 Feb 13, 2022 v0.0.0 Feb 13, 2022 Changes in this version + const MaxAssociatedDataItems + var ErrKeySize = errors.New("siv: bad key size") + var ErrNotAuthentic = errors.New("siv: authentication failed") + var ErrTooManyAssociatedDataItems = errors.New("siv: too many associated data items") + func GenerateKey(length int) []byte + func GenerateNonce(c cipher.AEAD) []byte + func NewAEAD(alg string, key []byte, nonceSize int) (cipher.AEAD, error) + type Cipher struct + func NewAESCMACSIV(key []byte) (c *Cipher, err error) + func NewAESPMACSIV(key []byte) (c *Cipher, err error) + func (c *Cipher) Open(dst []byte, ciphertext []byte, data ...[]byte) ([]byte, error) + func (c *Cipher) Overhead() int + func (c *Cipher) Seal(dst []byte, plaintext []byte, data ...[]byte) ([]byte, error) + type StreamDecryptor struct + func NewStreamDecryptor(alg string, key, nonce []byte) (*StreamDecryptor, error) + func (d *StreamDecryptor) NonceSize() int + func (d *StreamDecryptor) Open(dst, ciphertext, aData []byte, lastBlock bool) ([]byte, error) + func (d *StreamDecryptor) Overhead() int + type StreamEncryptor struct + func NewStreamEncryptor(alg string, key, nonce []byte) (*StreamEncryptor, error) + func (e *StreamEncryptor) NonceSize() int + func (e *StreamEncryptor) Overhead() int + func (e *StreamEncryptor) Seal(dst, plaintext, aData []byte, lastBlock bool) []byte