MCPcopy Create free account
hub / github.com/ElementsProject/elements / EncodingConstant

Function EncodingConstant

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

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

Source from the content-addressed store, hash-verified

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

Callers 3

VerifyChecksumFunction · 0.70
CreateChecksumFunction · 0.70
LocateErrorsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected