How to Decrypting HashValue calculated using SHA 256


  • Hi
    I am using the following method to calculate the hashcode for a particular user
      public static string generateToken(string p_strUserName, string p_strPassword, string p_strField)
                HashAlgorithmProvider objHashAlgorithmProvider = HashAlgorithmProvider.OpenAlgorithm("SHA256");
                IBuffer objIBufferVector = CryptographicBuffer.ConvertStringToBinary((p_strUserName + p_strPassword + p_strField), BinaryStringEncoding.Utf8);
                IBuffer objIBufferDigest = objHashAlgorithmProvider.HashData(objIBufferVector);
               string strDataHash= string.Empty;
               if (objIBufferDigest.Length != objHashAlgorithmProvider.HashLength)
                throw new System.InvalidOperationException(
                  "HashAlgorithmProvider failed to generate a hash of proper length!");            
                strDataHash = CryptographicBuffer.EncodeToHexString(objIBufferDigest);//Encoding it to a Hex String 
                return strDataHash;
    Is it possible To Decrypt the key back to plain text? 

    Nikhil Sharma10

    Thursday, July 03, 2014 9:15 AM