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