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