aboutsummaryrefslogtreecommitdiff
path: root/src/bip324.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2023-09-08 11:48:09 -0400
committerPieter Wuille <pieter@wuille.net>2023-09-10 16:11:52 -0400
commitb6934fd03f080d437acb1fd2b665503c3d6de785 (patch)
tree908f31869071c72d6f2c2b7a0fc382c40706bd7b /src/bip324.h
parentc5a63ea56f8347139bd84e1669b378ecfb234c3c (diff)
net: merge V2Transport constructors, move key gen
This removes the ability for BIP324Cipher to generate its own key, moving that responsibility to the caller (mostly, V2Transport). This allows us to write the random-key V2Transport constructor by delegating to the explicit-key one.
Diffstat (limited to 'src/bip324.h')
-rw-r--r--src/bip324.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bip324.h b/src/bip324.h
index 0238c479c0..28e7c411ea 100644
--- a/src/bip324.h
+++ b/src/bip324.h
@@ -41,8 +41,8 @@ private:
std::array<std::byte, GARBAGE_TERMINATOR_LEN> m_recv_garbage_terminator;
public:
- /** Initialize a BIP324 cipher with securely generated random keys. */
- BIP324Cipher() noexcept;
+ /** No default constructor; keys must be provided to create a BIP324Cipher. */
+ BIP324Cipher() = delete;
/** Initialize a BIP324 cipher with specified key and encoding entropy (testing only). */
BIP324Cipher(const CKey& key, Span<const std::byte> ent32) noexcept;