| 87 | } |
| 88 | |
| 89 | uint32_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 | |
| 100 | bool BIP324Cipher::Decrypt(std::span<const std::byte> input, std::span<const std::byte> aad, bool& ignore, std::span<std::byte> contents) noexcept |
| 101 | { |