Lines Matching refs:shash

278 	struct shash_desc *shash;  in nvmet_auth_host_hash()  local
337 shash = kzalloc(sizeof(*shash) + crypto_shash_descsize(shash_tfm), in nvmet_auth_host_hash()
339 if (!shash) { in nvmet_auth_host_hash()
343 shash->tfm = shash_tfm; in nvmet_auth_host_hash()
344 ret = crypto_shash_init(shash); in nvmet_auth_host_hash()
347 ret = crypto_shash_update(shash, challenge, shash_len); in nvmet_auth_host_hash()
351 ret = crypto_shash_update(shash, buf, 4); in nvmet_auth_host_hash()
355 ret = crypto_shash_update(shash, buf, 2); in nvmet_auth_host_hash()
359 ret = crypto_shash_update(shash, buf, 1); in nvmet_auth_host_hash()
362 ret = crypto_shash_update(shash, "HostHost", 8); in nvmet_auth_host_hash()
365 ret = crypto_shash_update(shash, ctrl->hostnqn, strlen(ctrl->hostnqn)); in nvmet_auth_host_hash()
368 ret = crypto_shash_update(shash, buf, 1); in nvmet_auth_host_hash()
371 ret = crypto_shash_update(shash, ctrl->subsysnqn, in nvmet_auth_host_hash()
375 ret = crypto_shash_final(shash, response); in nvmet_auth_host_hash()
377 kfree(shash); in nvmet_auth_host_hash()
392 struct shash_desc *shash; in nvmet_auth_ctrl_hash() local
447 shash = kzalloc(sizeof(*shash) + crypto_shash_descsize(shash_tfm), in nvmet_auth_ctrl_hash()
449 if (!shash) { in nvmet_auth_ctrl_hash()
453 shash->tfm = shash_tfm; in nvmet_auth_ctrl_hash()
455 ret = crypto_shash_init(shash); in nvmet_auth_ctrl_hash()
458 ret = crypto_shash_update(shash, challenge, shash_len); in nvmet_auth_ctrl_hash()
462 ret = crypto_shash_update(shash, buf, 4); in nvmet_auth_ctrl_hash()
466 ret = crypto_shash_update(shash, buf, 2); in nvmet_auth_ctrl_hash()
470 ret = crypto_shash_update(shash, buf, 1); in nvmet_auth_ctrl_hash()
473 ret = crypto_shash_update(shash, "Controller", 10); in nvmet_auth_ctrl_hash()
476 ret = crypto_shash_update(shash, ctrl->subsysnqn, in nvmet_auth_ctrl_hash()
480 ret = crypto_shash_update(shash, buf, 1); in nvmet_auth_ctrl_hash()
483 ret = crypto_shash_update(shash, ctrl->hostnqn, strlen(ctrl->hostnqn)); in nvmet_auth_ctrl_hash()
486 ret = crypto_shash_final(shash, response); in nvmet_auth_ctrl_hash()
488 kfree(shash); in nvmet_auth_ctrl_hash()