| 36 | } |
| 37 | |
| 38 | void subkey_from_hmac(const char *prefix, |
| 39 | const struct secret *base, |
| 40 | struct secret *key) |
| 41 | { |
| 42 | struct hmac h; |
| 43 | hmac(base->data, sizeof(base->data), prefix, strlen(prefix), &h); |
| 44 | CROSS_TYPE_ASSIGNMENT(&key->data, &h.bytes); |
| 45 | } |
| 46 | |
| 47 | void towire_hmac(u8 **pptr, const struct hmac *hmac) |
| 48 | { |
no test coverage detected