/* If this interface is not supported, then return FALSE. */
STATIC BOOLEAN HmacMdAll(IN CONST EVP_MD *Md, IN CONST VOID *Data, IN UINTN DataSize, IN CONST UINT8 *Key, IN UINTN KeySize, OUT UINT8 *HmacValue)
/* If this interface is not supported, then return FALSE. */
STATIC BOOLEAN HmacMdAll(IN CONST EVP_MD *Md, IN CONST VOID *Data, IN UINTN DataSize, IN CONST UINT8 *Key, IN UINTN KeySize, OUT UINT8 *HmacValue)
{
  UINT32    Length;
  HMAC_CTX  *Ctx;
  BOOLEAN   RetVal;
  Ctx = HMAC_CTX_new ();
  if (Ctx == NULL) {
    return FALSE;
  }
  RetVal = (BOOLEAN)HMAC_CTX_reset (Ctx);
  if (!RetVal) {
    goto Done;
  }
  RetVal = (BOOLEAN)HMAC_Init_ex (Ctx, Key, (UINT32)KeySize, Md, NULL);
  if (!RetVal) {
    goto Done;
  }
  RetVal = (BOOLEAN)HMAC_Update (Ctx, Data, DataSize);
  if (!RetVal) {
    goto Done;
  }
  RetVal = (BOOLEAN)HMAC_Final (Ctx, HmacValue, &Length);
  if (!RetVal) {
    goto Done;
  }
Done:
  HMAC_CTX_free (Ctx);
  return RetVal;
}