[#BIP324Cipher-Initialize] = xref:BIP324Cipher.adoc[BIP324Cipher]::Initialize :relfileprefix: ../ :mrdocs: Initialize when the other side's public key is received. Can only be called once. == Synopsis Declared in `<bip324.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void Initialize( xref:EllSwiftPubKey.adoc[EllSwiftPubKey] const& their_pubkey, bool initiator, bool self_decrypt = false) noexcept; ---- == Description initiator is set to true if we are the initiator establishing the v2 P2P connection. self_decrypt is only for testing, and swaps encryption/decryption keys, so that encryption and decryption can be tested without knowing the other side's private key. == Parameters [cols="1,4"] |=== | Name| Description | *their_pubkey* | The other side's ElligatorSwift‐encoded public key. | *initiator* | True if we initiated the v2 P2P connection. | *self_decrypt* | Testing only; swaps the encryption and decryption keys. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#