示例#1
0
        public static string Decrypt(byte[] cipher, string reciverPrivateKey, string reciverSignaturePassword, string senderPublicKey)
        {
            PGPDecrypt test = new PGPDecrypt(cipher,
                                             reciverPrivateKey,
                                             reciverSignaturePassword,
                                             senderPublicKey);

            return(test.decryptToString(cipher));
        }
示例#2
0
        public static void Decrypt(string cipherFilePath, string reciverPrivateKey, string reciverSignaturePassword, string outputDecryptFile, string senderPublicKey)
        {
            PGPDecrypt test = new PGPDecrypt(cipherFilePath,
                                             reciverPrivateKey,
                                             reciverSignaturePassword,
                                             outputDecryptFile,
                                             senderPublicKey);

            using (FileStream fs = File.Open(cipherFilePath, FileMode.Open))
            {
                test.decrypt(fs);
                fs.Close();
            }
        }