Lines Matching refs:hash
11 #include <crypto/hash.h>
67 static int kdf_alloc(struct crypto_shash **hash, char *hashname)
71 /* allocate synchronous hash */
83 *hash = tfm;
88 static void kdf_dealloc(struct crypto_shash *hash)
90 if (hash)
91 crypto_free_shash(hash);
94 static int keyctl_dh_compute_kdf(struct crypto_shash *hash,
101 size_t outbuf_len = roundup(buflen, crypto_shash_digestsize(hash));
109 ret = crypto_kdf108_ctr_generate(hash, &kbuf_iov, 1, outbuf, outbuf_len);
138 struct crypto_shash *hash = NULL;
171 ret = kdf_alloc(&hash, hashname);
277 ret = keyctl_dh_compute_kdf(hash, buffer, buflen, outbuf,
296 kdf_dealloc(hash);