예제 #1
0
        public static bool CryptGetHashParam(
            SafeHashHandle safeHashHandle,
            CryptHashProperty dwParam,
            Span <byte> pbData,
            [In, Out] ref int pdwDataLen,
            int dwFlags)
        {
            if (pbData.IsEmpty)
            {
                return(CryptGetHashParam(safeHashHandle, dwParam, IntPtr.Zero, ref pdwDataLen, 0));
            }

            if (pdwDataLen > pbData.Length)
            {
                throw new IndexOutOfRangeException();
            }

            unsafe
            {
                fixed(byte *bytePtr = &MemoryMarshal.GetReference(pbData))
                {
                    return(CryptGetHashParam(safeHashHandle, dwParam, (IntPtr)bytePtr, ref pdwDataLen, 0));
                }
            }
        }
예제 #2
0
파일: CapiHelper.cs 프로젝트: SGuyGe/corefx
 public static extern bool CryptSetHashParam(SafeHashHandle hHash, CryptHashProperty dwParam, byte[] buffer, int dwFlags);
예제 #3
0
파일: CapiHelper.cs 프로젝트: SGuyGe/corefx
 public static extern bool CryptGetHashParam(SafeHashHandle hHash, CryptHashProperty dwParam, out int pbData, [In, Out] ref int pdwDataLen, int dwFlags);
예제 #4
0
 public static extern bool CryptSetHashParam(SafeHashHandle hHash, CryptHashProperty dwParam, byte[] buffer, int dwFlags);
예제 #5
0
 public static extern bool CryptGetHashParam(
     SafeHashHandle hHash,
     CryptHashProperty dwParam,
     IntPtr pbData,
     [In, Out] ref int pdwDataLen,
     int dwFlags);
예제 #6
0
 public static partial bool CryptGetHashParam(
     SafeHashHandle hHash,
     CryptHashProperty dwParam,
     out int pbData,
     ref int pdwDataLen,
     int dwFlags);