From 35f88b305ab6a0e27b5ff1b445f63f544986e14e Mon Sep 17 00:00:00 2001 From: Toke Høiland-Jørgensen Date: Wed, 14 Apr 2021 21:39:43 +0200 Subject: Nest: Allow specifying security keys as hex bytes as well as strings Add support for specifying a password in hexadecimal format, The result is the same whether a password is specified as a quoted string or a hex-encoded byte string, this just makes it more convenient to input high-entropy byte strings as MAC keys. --- lib/string.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/string.h') diff --git a/lib/string.h b/lib/string.h index 0f650178..976b1c24 100644 --- a/lib/string.h +++ b/lib/string.h @@ -26,6 +26,7 @@ void buffer_puts(buffer *buf, const char *str); u64 bstrtoul10(const char *str, char **end); u64 bstrtoul16(const char *str, char **end); +byte bstrtobyte16(const char *str); int patmatch(const byte *pat, const byte *str); -- cgit v1.2.3