]>
Commit | Line | Data |
---|---|---|
d95de082 SB |
1 | /** @file\r |
2 | PBKDF2 Key Derivation Function Wrapper Implementation which does not provide real\r | |
3 | capabilities.\r | |
4 | \r | |
5 | Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r | |
6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
7 | \r | |
8 | **/\r | |
9 | \r | |
10 | #include "InternalCryptLib.h"\r | |
11 | \r | |
12 | /**\r | |
13 | Derives a key from a password using a salt and iteration count, based on PKCS#5 v2.0\r | |
14 | password based encryption key derivation function PBKDF2, as specified in RFC 2898.\r | |
15 | \r | |
16 | Return FALSE to indicate this interface is not supported.\r | |
17 | \r | |
18 | @param[in] PasswordLength Length of input password in bytes.\r | |
19 | @param[in] Password Pointer to the array for the password.\r | |
20 | @param[in] SaltLength Size of the Salt in bytes.\r | |
21 | @param[in] Salt Pointer to the Salt.\r | |
22 | @param[in] IterationCount Number of iterations to perform. Its value should be\r | |
23 | greater than or equal to 1.\r | |
24 | @param[in] DigestSize Size of the message digest to be used (eg. SHA256_DIGEST_SIZE).\r | |
25 | NOTE: DigestSize will be used to determine the hash algorithm.\r | |
26 | Only SHA1_DIGEST_SIZE or SHA256_DIGEST_SIZE is supported.\r | |
27 | @param[in] KeyLength Size of the derived key buffer in bytes.\r | |
28 | @param[out] OutKey Pointer to the output derived key buffer.\r | |
29 | \r | |
30 | @retval FALSE This interface is not supported.\r | |
31 | \r | |
32 | **/\r | |
33 | BOOLEAN\r | |
34 | EFIAPI\r | |
35 | Pkcs5HashPassword (\r | |
36 | IN UINTN PasswordLength,\r | |
37 | IN CONST CHAR8 *Password,\r | |
38 | IN UINTN SaltLength,\r | |
39 | IN CONST UINT8 *Salt,\r | |
40 | IN UINTN IterationCount,\r | |
41 | IN UINTN DigestSize,\r | |
42 | IN UINTN KeyLength,\r | |
43 | OUT UINT8 *OutKey\r | |
44 | )\r | |
45 | {\r | |
46 | ASSERT (FALSE);\r | |
47 | return FALSE;\r | |
48 | }\r |