summaryrefslogtreecommitdiffstats
path: root/src/lib-mail/mail-user-hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib-mail/mail-user-hash.h')
-rw-r--r--src/lib-mail/mail-user-hash.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib-mail/mail-user-hash.h b/src/lib-mail/mail-user-hash.h
new file mode 100644
index 0000000..e3a9e59
--- /dev/null
+++ b/src/lib-mail/mail-user-hash.h
@@ -0,0 +1,10 @@
+#ifndef MAIL_USER_HASH
+#define MAIL_USER_HASH
+
+/* Get a hash for username, based on given format. The format can use
+ %n, %d and %u variables. The returned hash is never 0.
+ Returns TRUE if ok, FALSE if format is invalid. */
+bool mail_user_hash(const char *username, const char *format,
+ unsigned int *hash_r, const char **error_r);
+
+#endif