/* If Sha1Context is NULL, then return FALSE. If HashValue is NULL, then return FALSE. */
BOOLEAN EFIAPI Sha1Final(IN OUT VOID *Sha1Context, OUT UINT8 *HashValue)
/* If Sha1Context is NULL, then return FALSE. If HashValue is NULL, then return FALSE. */
BOOLEAN EFIAPI Sha1Final(IN OUT VOID *Sha1Context, OUT UINT8 *HashValue)
{
  INT32  Ret;
  if ((Sha1Context == NULL) || (HashValue == NULL)) {
    return FALSE;
  }
  Ret = mbedtls_sha1_finish_ret (Sha1Context, HashValue);
  mbedtls_sha1_free (Sha1Context);
  if (Ret != 0) {
    return FALSE;
  }
  return TRUE;
}