Exemple #1
0
        public void TestEncryptionBoundaryFileDecryptEmptyString()
        {
            const string toEncryptFile     = "encryption_test_commonlibrary.txt";
            FileInfo     toEncryptFileInfo = ConfigFileLocator.GetFromAppConfigLocation(toEncryptFile);

            const string toDecryptFile     = "post-decryption_test_commonlibrary.txt";
            FileInfo     decryptedFileInfo = new FileInfo(toEncryptFileInfo.DirectoryName + @"\" + toDecryptFile);

            EncryptionUtil.DecryptFile(decryptedFileInfo, "");
        }
Exemple #2
0
        public void TestDecryptFile()
        {
            TestEncryptFile();

            const string encryptedFile     = "encryption_corrupted_test_commonlibrary.txt";
            const string toDecryptFile     = "post-encryption_corrupted_test_commonlibrary.txt";
            FileInfo     encryptedFileInfo = ConfigFileLocator.GetFromAppConfigLocation(encryptedFile);

            FileInfo decryptedFileInfo = new FileInfo(encryptedFileInfo.DirectoryName + @"\" + toDecryptFile);

            EncryptionUtil.DecryptFile(encryptedFileInfo, decryptedFileInfo.FullName);
        }
Exemple #3
0
 public void TestEncryptionBoundaryFileDecryptNullFile()
 {
     EncryptionUtil.DecryptFile(null, "");
 }