Documentation
¶
Overview ¶
Example ¶
if !common.Available { return } key := make([]byte, KeySize) rand.Read(key) aead, err := New(key, 16) if err != nil { panic(err) } nonce := make([]byte, aead.NonceSize()) rand.Read(nonce) ciphertext := aead.Seal(nil, nonce, []byte("hello, world!"), nil) plaintext, err := aead.Open(nil, nonce, ciphertext, nil) if err != nil { panic(err) } fmt.Println(string(plaintext))
Output: hello, world!
Index ¶
Examples ¶
Constants ¶
View Source
const ( KeySize = 32 NonceSize = 32 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Aegis256X2 ¶
func (*Aegis256X2) Open ¶
func (aead *Aegis256X2) Open(plaintext, nonce, ciphertext, additionalData []byte) ([]byte, error)
func (*Aegis256X2) Seal ¶
func (aead *Aegis256X2) Seal(dst, nonce, cleartext, additionalData []byte) []byte
Click to show internal directories.
Click to hide internal directories.