| 4 | #include <string.h> |
| 5 | |
| 6 | void hash_u5_init(struct hash_u5 *hu5, const char *hrp) |
| 7 | { |
| 8 | hu5->buf = 0; |
| 9 | hu5->num_bits = 0; |
| 10 | sha256_init(&hu5->hash); |
| 11 | sha256_update(&hu5->hash, hrp, strlen(hrp)); |
| 12 | } |
| 13 | |
| 14 | void hash_u5(struct hash_u5 *hu5, const u8 *u5, size_t len) |
| 15 | { |