You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Using the same Salt and Secret Phrase for both C# and Crypto.js (Lets just
use a SessionID ans an example to make is simple)
2. Java Code:
var salt = CryptoJS.SHA256("<%=Session.SessionID%>");
var key256Bits = CryptoJS.PBKDF2("<%=Session.SessionID%>", salt, { keySize: 256
/ 32 });
$("#TextBox3").val(key128Bits.toString(CryptoJS.enc.Base64));
3. C# Code
SHA256 sha = SHA256.Create();
Rfc2898DeriveBytes ByteMake = new Rfc2898DeriveBytes(Session.SessionID,
sha.ComputeHash(UTF8Encoding.UTF8.GetBytes(Session.SessionID)));
TextBox2.Text = Convert.ToBase64String(ByteMake.GetBytes(32));
What is the expected output? What do you see instead?
I would expect the results to be identical in each text box.
What version of the product are you using? On what operating system?
Crypto.js - Version 3.1.2
Asp.net 4.5
Windows Server 2012 R2
Please provide any additional information below.
Original issue reported on code.google.com by coldfiredragon on 30 Jul 2014 at 8:45
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
coldfiredragon
on 30 Jul 2014 at 8:45The text was updated successfully, but these errors were encountered: