MCPcopy Create free account
hub / github.com/XTLS/Go / prefixNonceAEAD

Struct prefixNonceAEAD

cipher_suites.go:449–453  ·  view source on GitHub ↗

prefixNonceAEAD wraps an AEAD and prefixes a fixed portion of the nonce to each call.

Source from the content-addressed store, hash-verified

447// prefixNonceAEAD wraps an AEAD and prefixes a fixed portion of the nonce to
448// each call.
449type prefixNonceAEAD struct {
450 // nonce contains the fixed part of the nonce in the first four bytes.
451 nonce [aeadNonceLength]byte
452 aead cipher.AEAD
453}
454
455func (f *prefixNonceAEAD) NonceSize() int { return aeadNonceLength - noncePrefixLength }
456func (f *prefixNonceAEAD) Overhead() int { return f.aead.Overhead() }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected