MCPcopy Create free account
hub / github.com/ElementsProject/lightning / input_hrp

Function input_hrp

common/codex32.c:134–145  ·  view source on GitHub ↗

Helper to input the HRP of codex32 string into the checksum engine */

Source from the content-addressed store, hash-verified

132
133/* Helper to input the HRP of codex32 string into the checksum engine */
134static void input_hrp(const u8 *generator, u8 *residue, const char *hrp, size_t len)
135{
136 size_t i = 0;
137 for (i = 0; i < strlen(hrp); i++) {
138 input_fe(generator, residue, hrp[i] >> 5, len);
139 }
140 input_fe(generator, residue, hrp[i] >> 0, len);
141 for (i = 0; i < strlen(hrp); i++) {
142 input_fe(generator, residue, hrp[i] & 0x1f, len);
143 }
144 return;
145}
146
147/* Helper to input data strong of codex32 into the checksum engine. */
148static void input_data_str(u8 *generator, u8 *residue, const char *datastr, size_t len)

Callers 2

checksum_verifyFunction · 0.85
calculate_checksumFunction · 0.85

Calls 1

input_feFunction · 0.85

Tested by

no test coverage detected