Ejemplo n.º 1
0
        public void GPPrefPwdObfuscator_Decrypt_TestVector2()
        {
            string encrypted = "v9NWtCCOKEUHkZBxakMd6IyXC7oVAVOIz0O6imVn+fM7rAFz8kC2EPSQSYob/r7+";
            string decrypted = "Pa$$w0rdPa$$w0rd";
            string result    = GPPrefPwdObfuscator.Decrypt(encrypted);

            Assert.AreEqual(decrypted, result);
        }
Ejemplo n.º 2
0
        public void GPPrefPwdObfuscator_Decrypt_TestVector1()
        {
            string encrypted = "v9NWtCCOKEUHkZBxakMd6HLzo4+DzuizXP83EaImqF8";
            string decrypted = "Pa$$w0rd";
            string result    = GPPrefPwdObfuscator.Decrypt(encrypted);

            Assert.AreEqual(decrypted, result);
        }
Ejemplo n.º 3
0
 protected override void ProcessRecord()
 {
     WriteVerbose("Decrypting GP Preferences password.");
     try
     {
         string password = GPPrefPwdObfuscator.Decrypt(EncryptedPassword);
         this.WriteObject(password);
     }
     catch (Exception ex)
     {
         ErrorRecord error = new ErrorRecord(ex, "Error1", ErrorCategory.NotSpecified, EncryptedPassword);
         this.WriteError(error);
     }
 }
Ejemplo n.º 4
0
 public void GPPrefPwdObfuscator_Decrypt_EmptyInput()
 {
     string result = GPPrefPwdObfuscator.Decrypt(String.Empty);
 }
Ejemplo n.º 5
0
 public void GPPrefPwdObfuscator_Decrypt_NullInput()
 {
     string result = GPPrefPwdObfuscator.Decrypt(null);
 }