]>
Commit | Line | Data |
---|---|---|
532616bb | 1 | /** @file\r |
2 | SHA-1 Digest Wrapper Implementation which does not provide real capabilities.\r | |
3 | \r | |
4 | Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #include "InternalCryptLib.h"\r | |
16 | \r | |
17 | \r | |
18 | /**\r | |
19 | Retrieves the size, in bytes, of the context buffer required for SHA-1 hash operations.\r | |
20 | \r | |
21 | Return zero to indicate this interface is not supported.\r | |
22 | \r | |
23 | @return The size, in bytes, of the context buffer required for SHA-1 hash operations.\r | |
24 | @retval 0 This interface is not supported.\r | |
25 | \r | |
26 | **/\r | |
27 | UINTN\r | |
28 | EFIAPI\r | |
29 | Sha1GetContextSize (\r | |
30 | VOID\r | |
31 | )\r | |
32 | {\r | |
33 | ASSERT (FALSE);\r | |
34 | return 0; \r | |
35 | }\r | |
36 | \r | |
37 | /**\r | |
38 | Initializes user-supplied memory pointed by Sha1Context as SHA-1 hash context for\r | |
39 | subsequent use.\r | |
40 | \r | |
41 | Return FALSE to indicate this interface is not supported.\r | |
42 | \r | |
43 | @param[out] Sha1Context Pointer to SHA-1 context being initialized.\r | |
44 | \r | |
45 | @retval FALSE This interface is not supported.\r | |
46 | \r | |
47 | **/\r | |
48 | BOOLEAN\r | |
49 | EFIAPI\r | |
50 | Sha1Init (\r | |
51 | OUT VOID *Sha1Context\r | |
52 | )\r | |
53 | {\r | |
54 | ASSERT (FALSE);\r | |
55 | return FALSE;\r | |
56 | }\r | |
57 | \r | |
58 | /**\r | |
59 | Makes a copy of an existing SHA-1 context.\r | |
60 | \r | |
61 | Return FALSE to indicate this interface is not supported.\r | |
62 | \r | |
63 | @param[in] Sha1Context Pointer to SHA-1 context being copied.\r | |
64 | @param[out] NewSha1Context Pointer to new SHA-1 context.\r | |
65 | \r | |
66 | @retval FALSE This interface is not supported.\r | |
67 | \r | |
68 | **/\r | |
69 | BOOLEAN\r | |
70 | EFIAPI\r | |
71 | Sha1Duplicate (\r | |
72 | IN CONST VOID *Sha1Context,\r | |
73 | OUT VOID *NewSha1Context\r | |
74 | )\r | |
75 | {\r | |
76 | ASSERT (FALSE);\r | |
77 | return FALSE;\r | |
78 | }\r | |
79 | \r | |
80 | /**\r | |
81 | Digests the input data and updates SHA-1 context.\r | |
82 | \r | |
83 | Return FALSE to indicate this interface is not supported.\r | |
84 | \r | |
85 | @param[in, out] Sha1Context Pointer to the SHA-1 context.\r | |
86 | @param[in] Data Pointer to the buffer containing the data to be hashed.\r | |
87 | @param[in] DataSize Size of Data buffer in bytes.\r | |
88 | \r | |
89 | @retval FALSE This interface is not supported.\r | |
90 | \r | |
91 | **/\r | |
92 | BOOLEAN\r | |
93 | EFIAPI\r | |
94 | Sha1Update (\r | |
95 | IN OUT VOID *Sha1Context,\r | |
96 | IN CONST VOID *Data,\r | |
97 | IN UINTN DataSize\r | |
98 | )\r | |
99 | {\r | |
100 | ASSERT (FALSE);\r | |
101 | return FALSE;\r | |
102 | }\r | |
103 | \r | |
104 | /**\r | |
105 | Completes computation of the SHA-1 digest value.\r | |
106 | \r | |
107 | Return FALSE to indicate this interface is not supported.\r | |
108 | \r | |
109 | @param[in, out] Sha1Context Pointer to the SHA-1 context.\r | |
110 | @param[out] HashValue Pointer to a buffer that receives the SHA-1 digest\r | |
111 | value (20 bytes).\r | |
112 | \r | |
113 | @retval FALSE This interface is not supported.\r | |
114 | \r | |
115 | **/\r | |
116 | BOOLEAN\r | |
117 | EFIAPI\r | |
118 | Sha1Final (\r | |
119 | IN OUT VOID *Sha1Context,\r | |
120 | OUT UINT8 *HashValue\r | |
121 | )\r | |
122 | {\r | |
123 | ASSERT (FALSE);\r | |
124 | return FALSE;\r | |
125 | }\r |