Lines Matching defs:secret
161 struct nvme_dhchap_key *nvme_auth_extract_key(unsigned char *secret,
168 size_t allocated_len = strlen(secret);
171 p = strrchr(secret, ':');
173 allocated_len = p - secret;
178 key_len = base64_decode(secret, allocated_len, key->key);
449 int nvme_auth_generate_key(u8 *secret, struct nvme_dhchap_key **ret_key)
454 if (!secret) {
459 if (sscanf(secret, "DHHC-1:%hhd:%*s:", &key_hash) != 1)
462 /* Pass in the secret without the 'DHHC-1:XX:' prefix */
463 key = nvme_auth_extract_key(secret + 10, key_hash);