public static string DecryptRsaPassword(string encryptedPassword)
        {
            RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();

            rsa.FromXmlString(RsaPrivateKey);
            byte[] result = rsa.Decrypt(AuthenticationUtility.HexStringToBytes(encryptedPassword), false);
            return(Encoding.GetEncoding("utf-8").GetString(result));
        }
Exemple #2
0
 public RsaPublicKey(RSAParameters parameters)
 {
     Exponent = AuthenticationUtility.BytesToHexString(parameters.Exponent);
     Modulus  = AuthenticationUtility.BytesToHexString(parameters.Modulus);
 }