예제 #1
0
        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));
        }
예제 #2
0
 public RsaPublicKey(RSAParameters parameters)
 {
     Exponent = AuthenticationUtility.BytesToHexString(parameters.Exponent);
     Modulus  = AuthenticationUtility.BytesToHexString(parameters.Modulus);
 }