Lines Matching defs:shash
267 struct shash_desc *shash;
282 pr_err("failed to allocate shash %s\n", hash_name);
324 shash = kzalloc(sizeof(*shash) + crypto_shash_descsize(shash_tfm),
326 if (!shash) {
330 shash->tfm = shash_tfm;
331 ret = crypto_shash_init(shash);
334 ret = crypto_shash_update(shash, challenge, shash_len);
338 ret = crypto_shash_update(shash, buf, 4);
342 ret = crypto_shash_update(shash, buf, 2);
346 ret = crypto_shash_update(shash, buf, 1);
349 ret = crypto_shash_update(shash, "HostHost", 8);
352 ret = crypto_shash_update(shash, ctrl->hostnqn, strlen(ctrl->hostnqn));
355 ret = crypto_shash_update(shash, buf, 1);
358 ret = crypto_shash_update(shash, ctrl->subsysnqn,
362 ret = crypto_shash_final(shash, response);
366 kfree(shash);
378 struct shash_desc *shash;
393 pr_err("failed to allocate shash %s\n", hash_name);
432 shash = kzalloc(sizeof(*shash) + crypto_shash_descsize(shash_tfm),
434 if (!shash) {
438 shash->tfm = shash_tfm;
440 ret = crypto_shash_init(shash);
443 ret = crypto_shash_update(shash, challenge, shash_len);
447 ret = crypto_shash_update(shash, buf, 4);
451 ret = crypto_shash_update(shash, buf, 2);
455 ret = crypto_shash_update(shash, buf, 1);
458 ret = crypto_shash_update(shash, "Controller", 10);
461 ret = crypto_shash_update(shash, ctrl->subsysnqn,
465 ret = crypto_shash_update(shash, buf, 1);
468 ret = crypto_shash_update(shash, ctrl->hostnqn, strlen(ctrl->hostnqn));
471 ret = crypto_shash_final(shash, response);
475 kfree(shash);