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

Function EncodingConstant

src/bech32.cpp:122–125  ·  view source on GitHub ↗

Determine the final constant to use for the specified encoding. */

Source from the content-addressed store, hash-verified

120
121/* Determine the final constant to use for the specified encoding. */
122uint32_t EncodingConstant(Encoding encoding) {
123 assert(encoding == Encoding::BECH32 || encoding == Encoding::BECH32M);
124 return encoding == Encoding::BECH32 ? 1 : 0x2bc830a3;
125}
126
127/** This function will compute what 6 5-bit values to XOR into the last 6 input values, in order to
128 * make the checksum 0. These 6 values are packed together in a single 30-bit integer. The higher

Callers 3

VerifyChecksumFunction · 0.85
CreateChecksumFunction · 0.85
LocateErrorsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected