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