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