Home | History | Annotate | Download | only in Hash
      1 /** @file
      2   MD5 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 /**
     19   Retrieves the size, in bytes, of the context buffer required for MD5 hash 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
     28 Md5GetContextSize (
     29   VOID
     30   )
     31 {
     32   ASSERT (FALSE);
     33   return 0;
     34 }
     35 
     36 
     37 /**
     38   Initializes user-supplied memory pointed by Md5Context as MD5 hash context for
     39   subsequent use.
     40 
     41   Return FALSE to indicate this interface is not supported.
     42 
     43   @param[out]  Md5Context  Pointer to MD5 context being initialized.
     44 
     45   @retval FALSE  This interface is not supported.
     46 
     47 **/
     48 BOOLEAN
     49 EFIAPI
     50 Md5Init (
     51   OUT  VOID  *Md5Context
     52   )
     53 {
     54   ASSERT (FALSE);
     55   return FALSE;
     56 }
     57 
     58 /**
     59   Makes a copy of an existing MD5 context.
     60 
     61   Return FALSE to indicate this interface is not supported.
     62 
     63   @param[in]  Md5Context     Pointer to MD5 context being copied.
     64   @param[out] NewMd5Context  Pointer to new MD5 context.
     65 
     66   @retval FALSE  This interface is not supported.
     67 
     68 **/
     69 BOOLEAN
     70 EFIAPI
     71 Md5Duplicate (
     72   IN   CONST VOID  *Md5Context,
     73   OUT  VOID        *NewMd5Context
     74   )
     75 {
     76   ASSERT (FALSE);
     77   return FALSE;
     78 }
     79 
     80 /**
     81   Digests the input data and updates MD5 context.
     82 
     83   Return FALSE to indicate this interface is not supported.
     84 
     85   @param[in, out]  Md5Context  Pointer to the MD5 context.
     86   @param[in]       Data        Pointer to the buffer containing the data to be hashed.
     87   @param[in]       DataSize    Size of Data buffer in bytes.
     88 
     89   @retval FALSE  This interface is not supported.
     90 
     91 **/
     92 BOOLEAN
     93 EFIAPI
     94 Md5Update (
     95   IN OUT  VOID        *Md5Context,
     96   IN      CONST VOID  *Data,
     97   IN      UINTN       DataSize
     98   )
     99 {
    100   ASSERT (FALSE);
    101   return FALSE;
    102 }
    103 
    104 /**
    105   Completes computation of the MD5 digest value.
    106 
    107   Return FALSE to indicate this interface is not supported.
    108 
    109   @param[in, out]  Md5Context  Pointer to the MD5 context.
    110   @param[out]      HashValue   Pointer to a buffer that receives the MD5 digest
    111                                value (16 bytes).
    112 
    113   @retval FALSE  This interface is not supported.
    114 
    115 **/
    116 BOOLEAN
    117 EFIAPI
    118 Md5Final (
    119   IN OUT  VOID   *Md5Context,
    120   OUT     UINT8  *HashValue
    121   )
    122 {
    123   ASSERT (FALSE);
    124   return FALSE;
    125 }
    126