49 references to ErrorCode
System.Core (49)
Microsoft\Win32\SafeHandles\BCryptSafeHandles.cs (6)
28private static extern BCryptNative.ErrorCode BCryptCloseAlgorithmProvider(IntPtr hAlgorithm, int flags); 31return BCryptCloseAlgorithmProvider(handle, 0) == BCryptNative.ErrorCode.Success; 63private static extern BCryptNative.ErrorCode BCryptDestroyHash(IntPtr hHash); 66bool success = BCryptDestroyHash(handle) == BCryptNative.ErrorCode.Success; 87internal static extern BCryptNative.ErrorCode BCryptDestroyKey(IntPtr hKey); 91return BCryptDestroyKey(handle) == BCryptNative.ErrorCode.Success;
System\Security\Cryptography\BCryptHashAlgorithm.cs (6)
138BCryptNative.ErrorCode error = BCryptNative.UnsafeNativeMethods.BCryptCreateHash(m_algorithmHandle, 146if (error != BCryptNative.ErrorCode.Success) { 193BCryptNative.ErrorCode error; 204if (error != BCryptNative.ErrorCode.Success) { 220BCryptNative.ErrorCode error = BCryptNative.UnsafeNativeMethods.BCryptFinishHash(m_hashHandle, 225if (error != BCryptNative.ErrorCode.Success) {
System\Security\Cryptography\BCryptNative.cs (32)
226internal static extern ErrorCode BCryptCreateHash(SafeBCryptAlgorithmHandle hAlgorithm, 238internal static extern ErrorCode BCryptGetProperty(SafeBCryptAlgorithmHandle hObject, 249internal static extern ErrorCode BCryptGetProperty(SafeBCryptKeyHandle hObject, 260internal static extern ErrorCode BCryptGetAlgorithmProperty(SafeBCryptAlgorithmHandle hObject, 271internal static extern ErrorCode BCryptGetHashProperty(SafeBCryptHashHandle hObject, 282internal static extern ErrorCode BCryptFinishHash(SafeBCryptHashHandle hHash, 291internal static extern unsafe ErrorCode BCryptHashData(SafeBCryptHashHandle hHash, 300internal static extern ErrorCode BCryptOpenAlgorithmProvider([Out] out SafeBCryptAlgorithmHandle phAlgorithm, 306internal static extern ErrorCode BCryptExportKey([In]SafeBCryptKeyHandle hKey, 322internal static extern ErrorCode BCryptImportKey( 334public static extern unsafe ErrorCode BCryptEncrypt( 347public static extern unsafe ErrorCode BCryptDecrypt( 360public static extern ErrorCode BCryptSetProperty( 446private delegate ErrorCode BCryptPropertyGetter<T>(T hObject, 511ErrorCode error = getter(algorithm, property, null, 0, ref bufferSize, 0); 513if (error != ErrorCode.BufferToSmall && error != ErrorCode.Success) { 522if (error != ErrorCode.Success) { 586ErrorCode error = UnsafeNativeMethods.BCryptOpenAlgorithmProvider(out algorithmHandle, 591if (error != ErrorCode.Success) { 618ErrorCode error = UnsafeNativeMethods.BCryptExportKey(hKey, IntPtr.Zero, blobType, null, 0, out length, 0); 620if (error != ErrorCode.BufferToSmall && error != ErrorCode.Success) 627if (error != ErrorCode.Success) { 652ErrorCode error = UnsafeNativeMethods.BCryptImportKey( 663if (error != ErrorCode.Success) 699ErrorCode error = UnsafeNativeMethods.BCryptEncrypt( 711if (error != ErrorCode.Success) 749ErrorCode error = UnsafeNativeMethods.BCryptDecrypt( 761if (error != ErrorCode.Success) 775ErrorCode error = UnsafeNativeMethods.BCryptSetProperty( 783if (error != ErrorCode.Success)
System\Security\Cryptography\X509Certificates\ECDsaCertificateExtensions.cs (5)
316BCryptNative.ErrorCode errorCode = BCryptNative.UnsafeNativeMethods.BCryptGetProperty(cryptHandle, propertyName, null, 0, out numBytesNeeded, 0); 317if (errorCode != BCryptNative.ErrorCode.Success) 322if (errorCode != BCryptNative.ErrorCode.Success) 337BCryptNative.ErrorCode errorCode = BCryptNative.UnsafeNativeMethods.BCryptGetProperty(cryptHandle, propertyName, null, 0, out numBytesNeeded, 0); 338return errorCode == BCryptNative.ErrorCode.Success && numBytesNeeded > 0;