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