]> git.proxmox.com Git - mirror_edk2.git/blame - CryptoPkg/Library/BaseCryptLib/Cipher/CryptArc4Null.c
CryptoPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / Cipher / CryptArc4Null.c
CommitLineData
630f67dd 1/** @file\r
532616bb 2 ARC4 Wrapper Implementation which does not provide real capabilities.\r
3\r
630f67dd 4Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
2009f6b4 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
532616bb 6\r
7**/\r
8\r
9#include "InternalCryptLib.h"\r
10\r
11/**\r
12 Retrieves the size, in bytes, of the context buffer required for ARC4 operations.\r
13\r
14 Return zero to indicate this interface is not supported.\r
15\r
16 @retval 0 This interface is not supported.\r
17\r
18\r
19**/\r
20UINTN\r
21EFIAPI\r
22Arc4GetContextSize (\r
23 VOID\r
24 )\r
25{\r
26 ASSERT (FALSE);\r
27 return 0;\r
28}\r
29\r
30/**\r
31 Initializes user-supplied memory as ARC4 context for subsequent use.\r
32\r
33 Return FALSE to indicate this interface is not supported.\r
34\r
35 @param[out] Arc4Context Pointer to ARC4 context being initialized.\r
36 @param[in] Key Pointer to the user-supplied ARC4 key.\r
37 @param[in] KeySize Size of ARC4 key in bytes.\r
38\r
39 @retval FALSE This interface is not supported.\r
40\r
41**/\r
42BOOLEAN\r
43EFIAPI\r
44Arc4Init (\r
45 OUT VOID *Arc4Context,\r
46 IN CONST UINT8 *Key,\r
47 IN UINTN KeySize\r
48 )\r
49{\r
50 ASSERT (FALSE);\r
51 return FALSE;\r
52}\r
53\r
54/**\r
55 Performs ARC4 encryption on a data buffer of the specified size.\r
56\r
57 Return FALSE to indicate this interface is not supported.\r
58\r
59 @param[in, out] Arc4Context Pointer to the ARC4 context.\r
60 @param[in] Input Pointer to the buffer containing the data to be encrypted.\r
61 @param[in] InputSize Size of the Input buffer in bytes.\r
62 @param[out] Output Pointer to a buffer that receives the ARC4 encryption output.\r
63\r
64 @retval FALSE This interface is not supported.\r
65\r
66**/\r
67BOOLEAN\r
68EFIAPI\r
69Arc4Encrypt (\r
70 IN OUT VOID *Arc4Context,\r
71 IN CONST UINT8 *Input,\r
72 IN UINTN InputSize,\r
73 OUT UINT8 *Output\r
74 )\r
630f67dd 75{\r
532616bb 76 ASSERT (FALSE);\r
77 return FALSE;\r
78}\r
79\r
80/**\r
81 Performs ARC4 decryption on a data buffer of the specified size.\r
82\r
83 Return FALSE to indicate this interface is not supported.\r
84\r
85 @param[in, out] Arc4Context Pointer to the ARC4 context.\r
86 @param[in] Input Pointer to the buffer containing the data to be decrypted.\r
87 @param[in] InputSize Size of the Input buffer in bytes.\r
88 @param[out] Output Pointer to a buffer that receives the ARC4 decryption output.\r
89\r
90 @retval FALSE This interface is not supported.\r
91\r
92**/\r
93BOOLEAN\r
94EFIAPI\r
95Arc4Decrypt (\r
96 IN OUT VOID *Arc4Context,\r
97 IN UINT8 *Input,\r
98 IN UINTN InputSize,\r
99 OUT UINT8 *Output\r
100 )\r
101{\r
102 ASSERT (FALSE);\r
103 return FALSE;\r
104}\r
105\r
106/**\r
107 Resets the ARC4 context to the initial state.\r
108\r
109 Return FALSE to indicate this interface is not supported.\r
110\r
111 @param[in, out] Arc4Context Pointer to the ARC4 context.\r
112\r
113 @retval FALSE This interface is not supported.\r
114\r
115**/\r
116BOOLEAN\r
117EFIAPI\r
118Arc4Reset (\r
119 IN OUT VOID *Arc4Context\r
120 )\r
121{\r
122 ASSERT (FALSE);\r
123 return FALSE;\r
124}\r