Home | History | Annotate | Download | only in Hmac
      1 /** @file
      2   HMAC-SHA1 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-SHA1 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 HmacSha1GetContextSize (
     28   VOID
     29   )
     30 {
     31   ASSERT (FALSE);
     32   return 0;
     33 }
     34 
     35 /**
     36   Initializes user-supplied memory pointed by HmacSha1Context as HMAC-SHA1 context for
     37   subsequent use.
     38 
     39   Return FALSE to indicate this interface is not supported.
     40 
     41   @param[out]  HmacSha1Context  Pointer to HMAC-SHA1 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 HmacSha1Init (
     51   OUT  VOID         *HmacSha1Context,
     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-SHA1 context.
     62 
     63   Return FALSE to indicate this interface is not supported.
     64 
     65   @param[in]  HmacSha1Context     Pointer to HMAC-SHA1 context being copied.
     66   @param[out] NewHmacSha1Context  Pointer to new HMAC-SHA1 context.
     67 
     68   @retval FALSE  This interface is not supported.
     69 
     70 **/
     71 BOOLEAN
     72 EFIAPI
     73 HmacSha1Duplicate (
     74   IN   CONST VOID  *HmacSha1Context,
     75   OUT  VOID        *NewHmacSha1Context
     76   )
     77 {
     78   ASSERT (FALSE);
     79   return FALSE;
     80 }
     81 
     82 /**
     83   Digests the input data and updates HMAC-SHA1 context.
     84 
     85   Return FALSE to indicate this interface is not supported.
     86 
     87   @param[in, out]  HmacSha1Context Pointer to the HMAC-SHA1 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 HmacSha1Update (
     97   IN OUT  VOID        *HmacSha1Context,
     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-SHA1 digest value.
    108 
    109   Return FALSE to indicate this interface is not supported.
    110 
    111   @param[in, out]  HmacSha1Context  Pointer to the HMAC-SHA1 context.
    112   @param[out]      HmacValue        Pointer to a buffer that receives the HMAC-SHA1 digest
    113                                     value (20 bytes).
    114 
    115   @retval FALSE  This interface is not supported.
    116 
    117 **/
    118 BOOLEAN
    119 EFIAPI
    120 HmacSha1Final (
    121   IN OUT  VOID   *HmacSha1Context,
    122   OUT     UINT8  *HmacValue
    123   )
    124 {
    125   ASSERT (FALSE);
    126   return FALSE;
    127 }
    128