To communicate with a server, I need to send the password SHA1 & base64 encoded the same way CryptoJS does this.
My problem is that I'm using VB.NET. The typical base64 encoding (UTF-8) result is different than the results of CryptoJS.
How can I base64 encode the SHA1 string in .NET the same way CryptoJS encodes it?
You can see both results here: https://jsfiddle.net/hn5qqLo7/
var helloworld = "Hello World";
var helloword_sha1 = CryptoJS.SHA1(helloworld);
document.write("SHA1: " + helloword_sha1);
var helloword_base64 = helloword_sha1.toString(CryptoJS.enc.Base64);
document.write("1) Base64: " + helloword_base64);
document.write("2) Base64: " + base64_encode(helloword_sha1.toString()));
where base64_encode
converts a given string to a Base 64 encoded string.
I saw a similar question, but I don't understand it. Decode a Base64 String using CryptoJS