示例#1
0
        public static string IpcfDecryptFileStream(
            Stream inputStream,
            string inputFilePath,
            DecryptFlags flags,
            bool suppressUI,
            bool offline,
            bool hasUserConsent,
            Form parentWindow,
            ref Stream outputStream,
            WaitHandle cancelCurrentOperation = null)
        {
            SafeIpcPromptContext ipcContext =
                SafeNativeMethods.CreateIpcPromptContext(suppressUI,
                                                         offline,
                                                         hasUserConsent,
                                                         IpcWindow.Create(parentWindow).Handle,
                                                         cancelCurrentOperation);

            return(IpcfDecryptFileStream(
                       inputStream,
                       inputFilePath,
                       flags,
                       ref outputStream,
                       ipcContext));
        }
示例#2
0
        public static string IpcfEncryptFileStream(
            Stream inputStream,
            string inputFilePath,
            SafeInformationProtectionLicenseHandle licenseHandle,
            EncryptFlags flags,
            bool suppressUI,
            bool offline,
            bool hasUserConsent,
            Form parentWindow,
            SymmetricKeyCredential symmKey,
            ref Stream outputStream,
            WaitHandle cancelCurrentOperation = null)
        {
            SafeIpcPromptContext ipcContext =
                SafeNativeMethods.CreateIpcPromptContext(
                    suppressUI,
                    offline,
                    hasUserConsent,
                    IpcWindow.Create(parentWindow).Handle,
                    symmKey,
                    cancelCurrentOperation);

            return(IpcfEncryptFileStream(
                       inputStream,
                       inputFilePath,
                       licenseHandle,
                       flags,
                       ref outputStream,
                       ipcContext));
        }
示例#3
0
 public static string IpcfDecryptFileStream(
     Stream inputStream,
     string inputFilePath,
     DecryptFlags flags,
     bool suppressUI,
     bool offline,
     bool hasUserConsent,
     Form parentWindow,
     ref Stream outputStream)
 {
     return(IpcfDecryptFileStream(
                inputStream,
                inputFilePath,
                flags,
                suppressUI,
                offline,
                hasUserConsent,
                IpcWindow.Create(parentWindow).Handle,
                ref outputStream));
 }
示例#4
0
 public static string IpcfDecryptFile(
     string inputFile,
     DecryptFlags flags,
     bool suppressUI,
     bool offline,
     bool hasUserConsent,
     Form parentWindow,
     SymmetricKeyCredential symmKey,
     string outputDirectory = null)
 {
     return(IpcfDecryptFile(
                inputFile,
                flags,
                suppressUI,
                offline,
                hasUserConsent,
                IpcWindow.Create(parentWindow).Handle,
                symmKey,
                outputDirectory));
 }
示例#5
0
 public static string IpcfEncryptFileStream(
     Stream inputStream,
     string inputFilePath,
     SafeInformationProtectionLicenseHandle licenseHandle,
     EncryptFlags flags,
     bool suppressUI,
     bool offline,
     bool hasUserConsent,
     Form parentWindow,
     SymmetricKeyCredential symmKey,
     ref Stream outputStream)
 {
     return(IpcfEncryptFileStream(
                inputStream,
                inputFilePath,
                licenseHandle,
                flags,
                suppressUI,
                offline,
                hasUserConsent,
                IpcWindow.Create(parentWindow).Handle,
                symmKey,
                ref outputStream));
 }
示例#6
0
 public static string IpcfEncryptFile(
     string inputFile,
     string templateId,
     EncryptFlags flags,
     bool suppressUI,
     bool offline,
     bool hasUserConsent,
     Form parentWindow,
     SymmetricKeyCredential symmKey    = null,
     string outputDirectory            = null,
     WaitHandle cancelCurrentOperation = null)
 {
     return(IpcfEncryptFile(
                inputFile,
                templateId,
                flags,
                suppressUI,
                offline,
                hasUserConsent,
                IpcWindow.Create(parentWindow).Handle,
                symmKey,
                outputDirectory,
                cancelCurrentOperation));
 }