| 401 | } |
| 402 | |
| 403 | struct rune *rune_from_string(const tal_t *ctx, const char *str) |
| 404 | { |
| 405 | u8 hash[32]; |
| 406 | if (!hex_decode(str, 64, hash, sizeof(hash))) |
| 407 | return NULL; |
| 408 | if (str[64] != ':') |
| 409 | return NULL; |
| 410 | return from_string(ctx, str + 65, hash); |
| 411 | } |
| 412 | |
| 413 | char *rune_to_string(const tal_t *ctx, const struct rune *rune) |
| 414 | { |