/* If HmacMdContext is NULL, then return FALSE. If HmacValue is NULL, then return FALSE. */
STATIC BOOLEAN HmacMdFinal(IN OUT VOID *HmacMdContext, OUT UINT8 *HmacValue)
/* If HmacMdContext is NULL, then return FALSE. If HmacValue is NULL, then return FALSE. */
STATIC BOOLEAN HmacMdFinal(IN OUT VOID *HmacMdContext, OUT UINT8 *HmacValue)
{
  INT32  Ret;
  if ((HmacMdContext == NULL) || (HmacValue == NULL)) {
    return FALSE;
  }
  Ret = mbedtls_md_hmac_finish (HmacMdContext, HmacValue);
  if (Ret != 0) {
    return FALSE;
  }
  Ret = mbedtls_md_hmac_reset (HmacMdContext);
  if (Ret != 0) {
    return FALSE;
  }
  return TRUE;
}