locked
decrypt a given string using any possible algorithm RRS feed

  • Question

  • hi

    i have this encryption method. after encryption  how i can decrypt it  

     public static string GeneratePassword(string username, string password, Guid userguid)
            {
                HashAlgorithm hash = new SHA512Managed();
                string salt = "tkhlFW7,abC1OpJN9ZheAm3&jjznvTv6oRXPvnvjbMtLr1lNfnPMAC1xOJW2k2cD";
                byte[] plainTextBytes = Encoding.UTF8.GetBytes(username + password);
                byte[] hashBytes = hash.ComputeHash(plainTextBytes);
                string hashValue = Convert.ToBase64String(hashBytes);
                byte[] pommes = Encoding.UTF8.GetBytes(hashValue + salt + userguid.ToString());
                byte[] hashBytes2 = hash.ComputeHash(pommes);
                string encryptedpassword = Convert.ToBase64String(hashBytes2);
                return encryptedpassword;
            }

    Thursday, June 28, 2018 12:18 PM

All replies