Пример #1
0
 internal static extern ErrorCode BCryptImportKey(SafeBCryptAlgorithmHandle hAlgorithm,
                                                  IntPtr hImportKey,
                                                  [MarshalAs(UnmanagedType.LPWStr)] string pszBlobType,
                                                  [Out] out SafeBCryptKeyHandle phKey,
                                                  [In, Out] IntPtr pbKeyObject,
                                                  int cbKeyObject,
                                                  [In, MarshalAs(UnmanagedType.LPArray)] byte[] pbInput,
                                                  int cbInput,
                                                  int dwFlags);
Пример #2
0
 internal static extern ErrorCode BCryptDecrypt(SafeBCryptKeyHandle hKey,
                                                [In, MarshalAs(UnmanagedType.LPArray)] byte[] pbInput,
                                                int cbInput,
                                                [In, Out] ref BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO pPaddingInfo,
                                                [In, Out, MarshalAs(UnmanagedType.LPArray)] byte[] pbIV,
                                                int cbIV,
                                                [Out, MarshalAs(UnmanagedType.LPArray)] byte[] pbOutput,
                                                int cbOutput,
                                                [Out] out int pcbResult,
                                                int dwFlags);