MCPcopy
hub / github.com/XTLS/REALITY / prefixNonceAEAD

Struct prefixNonceAEAD

cipher_suites.go:453–457  ·  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

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected