コード例 #1
0
 public void UnusualChars()
 {
     var encryptor = new TripleDesStringEncryptor();
     var encrypted = encryptor.EncryptString("!@#$%^&*()- +=");
     var decrypted = encryptor.DecryptString(encrypted);
     Assert.AreEqual("!@#$%^&*()- +=", decrypted);
 }
コード例 #2
0
 public void SimpleWordDecryptsToSameValueEncrypted()
 {
     var encryptor = new TripleDesStringEncryptor();
     var encrypted = encryptor.EncryptString("password");
     var decrypted = encryptor.DecryptString(encrypted);
     Assert.AreEqual("password", decrypted);
 }
コード例 #3
0
 public void SimpleWordEncryptsToKnownValue()
 {
     var encryptor = new TripleDesStringEncryptor();
     var encrypted = encryptor.EncryptString("password");
     Assert.AreEqual("wwwfBrRRCDxe3qSYCrri3w==", encrypted);
 }