File: src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeEvpMacHandle.Unix.cs
Web Access
Project: src\src\libraries\System.Security.Cryptography\src\System.Security.Cryptography.csproj (System.Security.Cryptography)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
 
using System;
using System.Security;
using System.Runtime.InteropServices;
 
namespace Microsoft.Win32.SafeHandles
{
    internal sealed class SafeEvpMacHandle : SafeHandle
    {
        public SafeEvpMacHandle() : base(0, ownsHandle: true)
        {
        }
 
        protected override bool ReleaseHandle()
        {
            Interop.Crypto.EvpMacFree(handle);
            return true;
        }
 
        public override bool IsInvalid => handle == 0;
    }
}