Helper to input the HRP of codex32 string into the checksum engine */
| 132 | |
| 133 | /* Helper to input the HRP of codex32 string into the checksum engine */ |
| 134 | static 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. */ |
| 148 | static void input_data_str(u8 *generator, u8 *residue, const char *datastr, size_t len) |
no test coverage detected