[#BIP324Cipher]
= BIP324Cipher
:mrdocs:

The BIP324 packet cipher, encapsulating its key derivation, stream cipher, and AEAD&period;

== Synopsis

Declared in `&lt;bip324&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class BIP324Cipher;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BIP324Cipher/2constructor-09.adoc[`BIP324Cipher`]         [.small]#[constructor]#
| Constructors
| xref:BIP324Cipher/Decrypt.adoc[`Decrypt`] 
| Decrypt a packet&period; Only after Initialize()&period;
| xref:BIP324Cipher/DecryptLength.adoc[`DecryptLength`] 
| Decrypt the length of a packet&period; Only after Initialize()&period;
| xref:BIP324Cipher/Encrypt.adoc[`Encrypt`] 
| Encrypt a packet&period; Only after Initialize()&period;
| xref:BIP324Cipher/GetOurPubKey.adoc[`GetOurPubKey`] 
| Retrieve our public key&period;
| xref:BIP324Cipher/GetReceiveGarbageTerminator.adoc[`GetReceiveGarbageTerminator`] 
| Get the expected Garbage Terminator to receive&period; Only after Initialize()&period;
| xref:BIP324Cipher/GetSendGarbageTerminator.adoc[`GetSendGarbageTerminator`] 
| Get the Garbage Terminator to send&period; Only after Initialize()&period;
| xref:BIP324Cipher/GetSessionID.adoc[`GetSessionID`] 
| Get the Session ID&period; Only after Initialize()&period;
| xref:BIP324Cipher/Initialize.adoc[`Initialize`] 
| Initialize when the other side&apos;s public key is received&period; Can only be called once&period;
| xref:BIP324Cipher/2conversion.adoc[`operator bool`] 
| Determine whether this cipher is fully initialized&period;
|===


== Static Data Members

[cols="1,4"]
|===
| Name| Description
| xref:BIP324Cipher/EXPANSION.adoc[`EXPANSION`] 
| Total ciphertext expansion added to each packet&period;
| xref:BIP324Cipher/GARBAGE_TERMINATOR_LEN.adoc[`GARBAGE&lowbar;TERMINATOR&lowbar;LEN`] 
| Length in bytes of a garbage terminator&period;
| xref:BIP324Cipher/HEADER_LEN.adoc[`HEADER&lowbar;LEN`] 
| Length in bytes of the per&hyphen;packet header&period;
| xref:BIP324Cipher/IGNORE_BIT.adoc[`IGNORE&lowbar;BIT`] 
| Header bit signalling that a packet should be ignored by the receiver&period;
| xref:BIP324Cipher/LENGTH_LEN.adoc[`LENGTH&lowbar;LEN`] 
| Length in bytes of the encrypted packet&hyphen;length field&period;
| xref:BIP324Cipher/REKEY_INTERVAL.adoc[`REKEY&lowbar;INTERVAL`] 
| Number of packets between automatic key rotations&period;
| xref:BIP324Cipher/SESSION_ID_LEN.adoc[`SESSION&lowbar;ID&lowbar;LEN`] 
| Length in bytes of the derived session ID&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
