• Home
  • Raw
  • Download

Lines Matching refs:key_len

62 	size_t key_len;  member
67 size_t key_len) in crypto_hash_init() argument
88 if (key_len > sizeof(k_pad)) { in crypto_hash_init()
90 MD5Update(&ctx->u.md5, key, key_len); in crypto_hash_init()
93 key_len = 16; in crypto_hash_init()
95 os_memcpy(ctx->key, key, key_len); in crypto_hash_init()
96 ctx->key_len = key_len; in crypto_hash_init()
98 os_memcpy(k_pad, key, key_len); in crypto_hash_init()
99 os_memset(k_pad + key_len, 0, sizeof(k_pad) - key_len); in crypto_hash_init()
106 if (key_len > sizeof(k_pad)) { in crypto_hash_init()
108 SHA1Update(&ctx->u.sha1, key, key_len); in crypto_hash_init()
111 key_len = 20; in crypto_hash_init()
113 os_memcpy(ctx->key, key, key_len); in crypto_hash_init()
114 ctx->key_len = key_len; in crypto_hash_init()
116 os_memcpy(k_pad, key, key_len); in crypto_hash_init()
117 os_memset(k_pad + key_len, 0, sizeof(k_pad) - key_len); in crypto_hash_init()
192 os_memcpy(k_pad, ctx->key, ctx->key_len); in crypto_hash_finish()
193 os_memset(k_pad + ctx->key_len, 0, in crypto_hash_finish()
194 sizeof(k_pad) - ctx->key_len); in crypto_hash_finish()
212 os_memcpy(k_pad, ctx->key, ctx->key_len); in crypto_hash_finish()
213 os_memset(k_pad + ctx->key_len, 0, in crypto_hash_finish()
214 sizeof(k_pad) - ctx->key_len); in crypto_hash_finish()
254 size_t key_len) in crypto_cipher_init() argument
266 if (key_len > sizeof(ctx->u.rc4.key)) { in crypto_cipher_init()
270 ctx->u.rc4.keylen = key_len; in crypto_cipher_init()
271 os_memcpy(ctx->u.rc4.key, key, key_len); in crypto_cipher_init()
274 if (key_len > sizeof(ctx->u.aes.cbc)) { in crypto_cipher_init()
278 ctx->u.aes.ctx_enc = aes_encrypt_init(key, key_len); in crypto_cipher_init()
283 ctx->u.aes.ctx_dec = aes_decrypt_init(key, key_len); in crypto_cipher_init()
289 ctx->u.aes.block_size = key_len; in crypto_cipher_init()
293 if (key_len != 24) { in crypto_cipher_init()