Searched defs:hash (Results 1 - 25 of 45) sorted by relevance

12

/dovecot/src/lib-otp/
H A Dotp.h13 unsigned char hash[OTP_HASH_SIZE]; member in struct:otp_state
17 #include "otp-hash.h"
H A Dotp-parse.c35 int otp_read_hex(const char *data, const char **endptr, unsigned char *hash) argument
45 buffer_create_from_data(&buf, hash, OTP_HASH_SIZE);
77 int otp_read_words(const char *data, const char **endptr, unsigned char *hash) argument
133 hash[0] = bits[0] >> 3;
134 hash[1] = ((bits[0] & 7) << 5) | (bits[1] >> 6);
135 hash[2] = ((bits[1] & 0x3f) << 2) | (bits[2] >> 9);
136 hash[3] = (bits[2] >> 1) & 0xff;
137 hash[4] = ((bits[2] & 3) << 7) | (bits[3] >> 4);
138 hash[5] = ((bits[3] & 15) << 4) | (bits[4] >> 7);
139 hash[
177 otp_parse_response(const char *data, unsigned char *hash, bool hex) argument
188 otp_parse_init_response(const char *data, struct otp_state *new_state, unsigned char *hash, bool hex, const char **error) argument
[all...]
/dovecot/src/lib-mail/
H A Dmail-user-hash.c7 #include "mail-user-hash.h"
13 unsigned int i, hash = 0; local
42 for (i = 0; i < sizeof(hash); i++)
43 hash = (hash << CHAR_BIT) | md5[i];
44 if (hash == 0) {
45 /* Make sure we don't return the hash as 0, since it's often
47 trying to insert it into a hash table will assert-crash. */
48 hash = 1;
50 *hash_r = hash;
[all...]
H A Distream-attachment-extractor.h10 const char *hash; member in struct:istream_attachment_info
25 /* Format to use when calculating attachment's hash. */
H A Dtest-istream-binary-converter.c161 struct sha1_ctxt hash; local
169 /* get hash when directly reading input */
171 sha1_init(&hash);
173 sha1_loop(&hash, data, size);
176 sha1_result(&hash, hash_file);
179 /* get hash when going through converter */
183 sha1_init(&hash);
185 sha1_loop(&hash, data, size);
188 sha1_result(&hash, hash_converter);
/dovecot/src/lib/
H A Dhmac.h4 #include "hash-method.h"
12 const struct hash_method *hash; member in struct:hmac_context_priv
32 ctx->hash->loop(ctx->ctx, data, size);
H A Dstr-table.c4 #include "hash.h"
8 HASH_TABLE(char *, void *) hash; member in struct:str_table
16 hash_table_create(&table->hash, default_pool, 0, str_hash, strcmp);
29 iter = hash_table_iterate_init(table->hash);
30 while (hash_table_iterate(iter, table->hash, &key, &value))
33 hash_table_destroy(&table->hash);
39 return hash_table_count(table->hash) == 0;
48 if (!hash_table_lookup_full(table->hash, str, &key, &value)) {
56 hash_table_update(table->hash, key, POINTER_CAST(ref));
66 if (!hash_table_lookup_full(table->hash, *st
[all...]
H A Dpkcs5.c5 #include "hash-method.h"
13 int pkcs5_pbkdf1(const struct hash_method *hash, argument
20 length > hash->digest_size) return -1;
23 unsigned char dk[hash->digest_size];
24 unsigned char ctx[hash->context_size];
26 hash->init(ctx);
27 hash->loop(ctx, password, password_len);
28 hash->loop(ctx, salt, salt_len);
29 hash->result(ctx, dk);
33 hash
44 pkcs5_pbkdf2(const struct hash_method *hash, const unsigned char *password, size_t password_len, const unsigned char *salt, size_t salt_len, unsigned int iter, uint32_t length, buffer_t *result) argument
84 pkcs5_pbkdf(enum pkcs5_pbkdf_mode mode, const struct hash_method *hash, const unsigned char *password, size_t password_len, const unsigned char *salt, size_t salt_len, unsigned int iterations, uint32_t dk_len, buffer_t *result) argument
[all...]
/dovecot/src/lib-fs/
H A Dfs-sis-common.c22 /* assume filename begins with "<hash>-" */
26 "Filenames must begin with '<hash>-'", path);
37 const char *dir, *hash, *hash_path; local
39 if (fs_sis_path_parse(sis_fs, super_file->path, &dir, &hash) == 0 &&
43 hash_path = t_strdup_printf("%s/"HASH_DIR_NAME"/%s", dir, hash);
/dovecot/src/director/
H A Dmail-host.h10 unsigned int hash; member in struct:mail_vhost
54 mail_host_get_by_hash(struct mail_host_list *list, unsigned int hash,
H A Dnotify-connection.c53 unsigned int hash; local
56 if (!director_get_username_hash(conn->dir, line, &hash))
59 notify_update_user(conn->dir, *tagp, line, hash);
H A Duser-directory.c6 #include "hash.h"
25 HASH_TABLE(void *, struct user *) hash; member in struct:user_directory
65 hash_table_remove(dir->hash, POINTER_CAST(user->username_hash));
125 return hash_table_count(dir->hash);
135 user = hash_table_lookup(dir->hash, POINTER_CAST(username_hash));
165 hash_table_insert(dir->hash, POINTER_CAST(user->username_hash), user);
205 unsigned int i, users_count = hash_table_count(dir->hash);
274 hash_table_create_direct(&dir->hash, default_pool, 0);
290 hash_table_destroy(&dir->hash);
/dovecot/src/auth/
H A Dmech-skey.c11 #include "hash.h"
36 "md4 hash is needed");
127 unsigned char hash[OTP_HASH_SIZE], cur_hash[OTP_HASH_SIZE]; local
131 memcpy(hash, data, 8);
135 ret = otp_parse_response(words, hash, FALSE);
145 otp_next_hash(state->algo, hash, cur_hash);
147 ret = memcmp(cur_hash, state->hash, OTP_HASH_SIZE);
154 memcpy(state->hash, hash, sizeof(state->hash));
[all...]
H A Dmech-otp.c11 #include "hash.h"
139 unsigned char hash[OTP_HASH_SIZE], cur_hash[OTP_HASH_SIZE]; local
142 ret = otp_parse_response(data, hash, hex);
151 otp_next_hash(state->algo, hash, cur_hash);
153 ret = memcmp(cur_hash, state->hash, OTP_HASH_SIZE);
160 memcpy(state->hash, hash, sizeof(state->hash));
173 unsigned char hash[OTP_HASH_SIZE], cur_hash[OTP_HASH_SIZE]; local
186 otp_next_hash(request->state.algo, cur_hash, hash);
[all...]
/dovecot/src/doveadm/
H A Ddoveadm-pw.c22 const char *hash = NULL; local
108 if (!password_generate_encoded(plaintext, &gen_params, scheme, &hash))
118 i_fatal("Missing {scheme} prefix from hash");
119 hash = test_hash;
122 if (password_decode(hash, scheme, &raw_password, &size,
132 printf("{%s}%s (verified)\n", scheme, hash);
134 printf("{%s}%s\n", scheme, hash);
143 "[-l] [-p plaintext] [-r rounds] [-s scheme] [-t hash] [-u user] [-V]"
H A Ddoveadm-dump-dcrypt-key.c36 string_t *hash = t_str_new(128); local
37 if (!dcrypt_key_id_public(pub_key, "sha256", hash, &error)) {
40 const char *v2_hash = binary_to_hex(hash->data, hash->used);
41 printf("v2 hash: %s\n", v2_hash);
44 buffer_set_used_size(hash, 0);
45 if (!dcrypt_key_id_public_old(pub_key, hash, &error)) {
49 const char *v1_hash = binary_to_hex(hash->data,
50 hash->used);
51 printf("v1 hash
75 string_t *hash = t_str_new(128); local
[all...]
H A Ddoveadm-fs.c7 #include "hash-method.h"
110 buffer_t *hash = NULL; local
116 hash = t_buffer_create(32);
117 if (hex_to_binary(optarg, hash) < 0)
132 if (hash == NULL)
134 else if (hash->used == hash_method_md5.digest_size) {
138 hash_method_lookup(hash_method_md5.name), hash->data);
139 } else if (hash->used == hash_method_sha256.digest_size) {
143 hash_method_lookup(hash_method_sha256.name), hash->data);
535 .usage = "[-h <hash>] <f
[all...]
H A Ddoveadm-sis.c19 /* Files are in <rootdir>/ha/sh/<hash>-<guid>
20 They may be hard linked to hashes/<hash>
23 static const char *sis_get_dir(const char *rootdir, const char *hash) argument
25 if (strlen(hash) < 4 || strchr(hash, '/') != NULL)
26 i_fatal("Invalid hash in filename: %s", hash);
28 hash[0], hash[1], hash[
134 const char *p, *hash, *hashdir, *path, *hashes_dir, *hashes_path; local
268 const char *rootdir, *path, *hash; local
[all...]
H A Ddoveadm-who.c8 #include "hash.h"
39 unsigned int hash = str_hash(user->service); local
42 hash += str_hash(user->username);
45 hash += net_ip_hash(&ip);
47 return hash;
/dovecot/src/lib-ntlm/
H A Dntlm-encrypt.c2 * NTLM and NTLMv2 hash generation.
36 void lm_hash(const char *passwd, unsigned char hash[LM_HASH_SIZE]) argument
47 deshash(hash, buffer, lm_magic);
48 deshash(hash + 8, buffer + 7, lm_magic);
53 void ntlm_v1_hash(const char *passwd, unsigned char hash[NTLMSSP_HASH_SIZE]) argument
58 md4_get_digest(wpwd, len, hash);
75 unsigned char hash[NTLMSSP_V2_HASH_SIZE])
83 hmac_final(&ctx, hash);
87 ntlmssp_v1_response(const unsigned char *hash, argument
93 memcpy(des_hash, hash, NTLMSSP_HASH_SIZ
73 ntlm_v2_hash(const char *user, const char *target, const unsigned char *hash_v1, unsigned char hash[NTLMSSP_V2_HASH_SIZE]) argument
105 ntlmssp2_response(const unsigned char *hash, const unsigned char *server_challenge, const unsigned char *client_challenge, unsigned char response[NTLMSSP_RESPONSE_SIZE]) argument
129 unsigned char hash[NTLMSSP_V2_HASH_SIZE]; local
[all...]
/dovecot/src/login-common/
H A Dlogin-proxy-state.c6 #include "hash.h"
17 struct login_proxy_record *) hash; member in struct:login_proxy_state
49 hash_table_create(&state->hash, state->pool, 0,
70 iter = hash_table_iterate_init(state->hash);
71 while (hash_table_iterate(iter, state->hash, &rec, &rec))
77 hash_table_destroy(&state->hash);
92 rec = hash_table_lookup(state->hash, &key);
97 hash_table_insert(state->hash, rec, rec);
/dovecot/src/lib-storage/index/maildir/
H A Dmaildir-keywords.c10 #include "hash.h"
34 HASH_TABLE(char *, void *) hash; /* name -> idx+1 */ member in struct:maildir_keywords
76 hash_table_create(&mk->hash, mk->pool, 0, strcase_hash, strcasecmp);
96 hash_table_destroy(&mk->hash);
106 hash_table_clear(mk->hash, TRUE);
172 hash_table_lookup(mk->hash, p) != NULL) {
179 hash_table_insert(mk->hash, new_name, POINTER_CAST(idx + 1));
202 value = hash_table_lookup(mk->hash, name);
211 value = hash_table_lookup(mk->hash, name);
230 hash_table_insert(mk->hash, new_nam
[all...]
/dovecot/src/lib-storage/
H A Dmail-duplicate.c9 #include "hash.h"
41 HASH_TABLE(struct mail_duplicate *, struct mail_duplicate *) hash; member in struct:mail_duplicate_file
71 /* a char* hash function from ASU -- from glib */
144 hash_table_update(file->hash, d, d);
151 if (hash_table_count(file->hash) *
220 hash_table_create(&file->hash, pool, 0, mail_duplicate_hash, mail_duplicate_cmp);
234 hash_table_destroy(&file->hash);
255 return hash_table_lookup(db->file->hash, &d) != NULL;
283 hash_table_update(db->file->hash, d, d);
311 iter = hash_table_iterate_init(file->hash);
[all...]
/dovecot/src/plugins/mail-crypt/
H A Dmail-crypt-acl-plugin.c113 const char *const *hash; local
114 array_foreach(&digests, hash) {
117 if ((ptr = strchr(*hash, '/')) != NULL)
120 ptr = *hash;
/dovecot/src/anvil/
H A Dpenalty.c9 #include "hash.h"
45 HASH_TABLE(char *, struct penalty_rec *) hash; member in struct:penalty
57 hash_table_create(&penalty->hash, default_pool, 0, str_hash, strcmp);
79 hash_table_destroy(&penalty->hash);
151 rec = hash_table_lookup(penalty->hash, ident);
180 hash_table_remove(penalty->hash, rec->ident);
194 rec = hash_table_lookup(penalty->hash, ident);
198 hash_table_insert(penalty->hash, rec->ident, rec);
239 rec = hash_table_lookup(penalty->hash, ident);

Completed in 1454 milliseconds

12