Mercurial > dovecot > core-2.2
view src/lib/hash-method.h @ 22636:96e51a11c0aa
lib: Implement t_strsplit_tabescaped_inplace()
This is a more efficient version of t_strsplit_tabescaped(), which modifies
the input string instead of duplicating it.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Sat, 04 Nov 2017 01:39:38 +0200 |
parents | 368fd1cce4d6 |
children |
line wrap: on
line source
#ifndef HASH_METHOD_H #define HASH_METHOD_H struct hash_method { const char *name; /* Number of bytes that must be allocated for context */ unsigned int context_size; /* Number of bytes that must be allocated for result()'s digest */ unsigned int digest_size; void (*init)(void *context); void (*loop)(void *context, const void *data, size_t size); void (*result)(void *context, unsigned char *digest_r); }; const struct hash_method *hash_method_lookup(const char *name); /* NULL-terminated list of all hash methods */ extern const struct hash_method *hash_methods[]; #endif