diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-04-09 17:15:55 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-04-09 17:15:55 +0100 |
commit | 1d56cbb68b103ccca36135a53d611d3e3fed4ec9 (patch) | |
tree | 1870edc932d06fcecffca612c5ffc803b0b82528 /src/libutil/str_util.c | |
parent | c2351037b581724ce6d6cbcf4da5a0115b87c8de (diff) | |
download | rspamd-1d56cbb68b103ccca36135a53d611d3e3fed4ec9.tar.gz rspamd-1d56cbb68b103ccca36135a53d611d3e3fed4ec9.zip |
[Minor] Add rfc3548 base32 alphabet
Diffstat (limited to 'src/libutil/str_util.c')
-rw-r--r-- | src/libutil/str_util.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libutil/str_util.c b/src/libutil/str_util.c index 473e68782..aaa3a0084 100644 --- a/src/libutil/str_util.c +++ b/src/libutil/str_util.c @@ -543,7 +543,9 @@ rspamd_encode_base32_buf (const guchar *in, gsize inlen, gchar *out, gsize outle enum rspamd_base32_type type) { static const char b32_default[] = "ybndrfg8ejkmcpqxot1uwisza345h769", - b32_bleach[] = "qpzry9x8gf2tvdw0s3jn54khce6mua7l", *b32; + b32_bleach[] = "qpzry9x8gf2tvdw0s3jn54khce6mua7l", + b32_rfc[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", + *b32; gchar *o, *end; gsize i; gint remain = -1, x; @@ -558,6 +560,9 @@ rspamd_encode_base32_buf (const guchar *in, gsize inlen, gchar *out, gsize outle case RSPAMD_BASE32_BLEACH: b32 = b32_bleach; break; + case RSPAMD_BASE32_RFC: + b32 = b32_rfc; + break; default: g_assert_not_reached (); abort (); |