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