Class ChaCha20Poly1305Spec

java.lang.Object
zeroecho.core.alg.chacha.ChaCha20Poly1305Spec
All Implemented Interfaces:
ChaChaBaseSpec, Describable, ContextSpec

public final class ChaCha20Poly1305Spec extends Object implements ChaChaBaseSpec, Describable

ChaCha20-Poly1305 algorithm specification

Immutable parameters for configuring a ChaCha20-Poly1305 operation. Optionally carries a SymmetricHeaderCodec to prepend/parse per-stream headers (e.g., nonce and AAD hash) during encryption/decryption.

Notes

  • If header() is null, no header is written or read; callers must exchange the nonce/AAD out-of-band via the context.
  • The effective authentication tag size is 128 bits.

Example

ChaCha20Poly1305Spec spec = ChaCha20Poly1305Spec.builder()
    .header(new ChaCha20Poly1305HeaderCodec())
    .build();
Since:
1.0