Lines Matching refs:key_len
35 size_t key_len; member
40 size_t key_len) in crypto_hash_init() argument
76 if (key_len > sizeof(k_pad)) { in crypto_hash_init()
78 MD5Update(&ctx->u.md5, key, key_len); in crypto_hash_init()
81 key_len = 16; in crypto_hash_init()
83 os_memcpy(ctx->key, key, key_len); in crypto_hash_init()
84 ctx->key_len = key_len; in crypto_hash_init()
86 os_memcpy(k_pad, key, key_len); in crypto_hash_init()
87 if (key_len < sizeof(k_pad)) in crypto_hash_init()
88 os_memset(k_pad + key_len, 0, sizeof(k_pad) - key_len); in crypto_hash_init()
95 if (key_len > sizeof(k_pad)) { in crypto_hash_init()
97 SHA1Update(&ctx->u.sha1, key, key_len); in crypto_hash_init()
100 key_len = 20; in crypto_hash_init()
102 os_memcpy(ctx->key, key, key_len); in crypto_hash_init()
103 ctx->key_len = key_len; in crypto_hash_init()
105 os_memcpy(k_pad, key, key_len); in crypto_hash_init()
106 if (key_len < sizeof(k_pad)) in crypto_hash_init()
107 os_memset(k_pad + key_len, 0, sizeof(k_pad) - key_len); in crypto_hash_init()
115 if (key_len > sizeof(k_pad)) { in crypto_hash_init()
117 sha256_process(&ctx->u.sha256, key, key_len); in crypto_hash_init()
120 key_len = 32; in crypto_hash_init()
122 os_memcpy(ctx->key, key, key_len); in crypto_hash_init()
123 ctx->key_len = key_len; in crypto_hash_init()
125 os_memcpy(k_pad, key, key_len); in crypto_hash_init()
126 if (key_len < sizeof(k_pad)) in crypto_hash_init()
127 os_memset(k_pad + key_len, 0, sizeof(k_pad) - key_len); in crypto_hash_init()
254 os_memcpy(k_pad, ctx->key, ctx->key_len); in crypto_hash_finish()
255 os_memset(k_pad + ctx->key_len, 0, in crypto_hash_finish()
256 sizeof(k_pad) - ctx->key_len); in crypto_hash_finish()
274 os_memcpy(k_pad, ctx->key, ctx->key_len); in crypto_hash_finish()
275 os_memset(k_pad + ctx->key_len, 0, in crypto_hash_finish()
276 sizeof(k_pad) - ctx->key_len); in crypto_hash_finish()
295 os_memcpy(k_pad, ctx->key, ctx->key_len); in crypto_hash_finish()
296 os_memset(k_pad + ctx->key_len, 0, in crypto_hash_finish()
297 sizeof(k_pad) - ctx->key_len); in crypto_hash_finish()