Lines Matching full:secret
153 struct nvme_dhchap_key *nvme_auth_extract_key(unsigned char *secret, in nvme_auth_extract_key() argument
160 size_t allocated_len = strlen(secret); in nvme_auth_extract_key()
162 /* Secret might be affixed with a ':' */ in nvme_auth_extract_key()
163 p = strrchr(secret, ':'); in nvme_auth_extract_key()
165 allocated_len = p - secret; in nvme_auth_extract_key()
175 key_len = base64_decode(secret, allocated_len, key->key); in nvme_auth_extract_key()
458 int nvme_auth_generate_key(u8 *secret, struct nvme_dhchap_key **ret_key) in nvme_auth_generate_key() argument
463 if (!secret) { in nvme_auth_generate_key()
468 if (sscanf(secret, "DHHC-1:%hhd:%*s:", &key_hash) != 1) in nvme_auth_generate_key()
471 /* Pass in the secret without the 'DHHC-1:XX:' prefix */ in nvme_auth_generate_key()
472 key = nvme_auth_extract_key(secret + 10, key_hash); in nvme_auth_generate_key()