sgns::crypto::bip39::EntropyAccumulator¶
Accumulates entropy tokens and exposes entropy + checksum. More...
#include <entropy_accumulator.hpp>
Public Functions¶
| Name | |
|---|---|
| outcome::result< EntropyAccumulator > | create(size_t words_count) create class instance |
| outcome::result< void > | append(const EntropyToken & value) append a new entropy token |
| outcome::result< std::vector< uint8_t > > | getEntropy() const |
| outcome::result< uint8_t > | getChecksum() const checksum is a part of last byte |
| outcome::result< uint8_t > | calculateChecksum() const calculates checksum of significant bits |
Detailed Description¶
Accumulates entropy tokens and exposes entropy + checksum.
Used to assemble mnemonic-derived entropy and validate its checksum.
Public Functions Documentation¶
function create¶
create class instance
Parameters:
- words_count number of words in mnemonic phrase
function append¶
append a new entropy token
Parameters:
- value token
Return: success or error if storage is full
function getEntropy¶
Return: entropy as byte array
function getChecksum¶
checksum is a part of last byte
Return: checksum
function calculateChecksum¶
calculates checksum of significant bits
Return: checksum value
Updated on 2026-03-04 at 13:10:43 -0800