MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / DecryptLength

Method DecryptLength

src/bip324.cpp:89–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89uint32_t BIP324Cipher::DecryptLength(std::span<const std::byte> input) noexcept
90{
91 assert(input.size() == LENGTH_LEN);
92
93 std::byte buf[LENGTH_LEN];
94 // Decrypt length
95 m_recv_l_cipher->Crypt(input, buf);
96 // Convert to number.
97 return uint32_t(buf[0]) + (uint32_t(buf[1]) << 8) + (uint32_t(buf[2]) << 16);
98}
99
100bool BIP324Cipher::Decrypt(std::span<const std::byte> input, std::span<const std::byte> aad, bool& ignore, std::span<std::byte> contents) noexcept
101{

Callers 4

ReceivePacketMethod · 0.80
bip324.cppFile · 0.80

Calls 2

CryptMethod · 0.80
sizeMethod · 0.45

Tested by 2

ReceivePacketMethod · 0.64