aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/str_util.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-04-10 11:27:08 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-04-10 11:44:46 +0100
commitbaecba4ce93e91b553e2d5d0d8e779dcd05e1d43 (patch)
tree53b2c0d9c3975168d8af45990bb90feb974d79af /src/libutil/str_util.h
parent52d05f46120f7a4cb9d1c9ff6a1d034dcb7f6849 (diff)
downloadrspamd-baecba4ce93e91b553e2d5d0d8e779dcd05e1d43.tar.gz
rspamd-baecba4ce93e91b553e2d5d0d8e779dcd05e1d43.zip
[Minor] Add helper to get base32 type
Diffstat (limited to 'src/libutil/str_util.h')
-rw-r--r--src/libutil/str_util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libutil/str_util.h b/src/libutil/str_util.h
index 3a794bcc0..f6c2a1389 100644
--- a/src/libutil/str_util.h
+++ b/src/libutil/str_util.h
@@ -163,9 +163,17 @@ enum rspamd_base32_type {
RSPAMD_BASE32_ZBASE = 0,
RSPAMD_BASE32_BLEACH,
RSPAMD_BASE32_RFC,
+ RSPAMD_BASE32_INVALID = -1,
};
/**
+ * Returns base32 type from a string or RSPAMD_BASE32_INVALID
+ * @param str
+ * @return
+ */
+enum rspamd_base32_type rspamd_base32_decode_type_from_str (const gchar *str);
+
+/**
* Encode string using base32 encoding
* @param in input
* @param inlen input length