Example #1
0
 /// <summary>
 /// Decrypts the credential.
 /// </summary>
 /// <param name="encryptedCredential">A string object that contain the encrypted credential.</param>
 /// <returns>A string object containing the clear credential.</returns>
 private string DecryptCredential(string encryptedCredential)
 {
     // Decrypt the byte array and convert it back into a string.
     byte[] buffer = Credential.Decrypt(Convert.FromBase64String(encryptedCredential), false);
     return(new UTF8Encoding().GetString(buffer));
 }