Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AES encrypted string to be converted to base 64 string and then to byte array in Javascript #132

Open
GoogleCodeExporter opened this issue Aug 27, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Hi,

I am new to JavaScript. I am encrypting a form using AES in JavaScript and when 
I try to convert the encrypted string to base64 string, i get null string. From 
base64 string, I need to convert to byte array which is the type for my 
webmethod.

Please help me on this. Following is the code i tried so far.

var randomKey='12345'
var 
encryptedString=CryptoJS.AES.encrypt(JSON.stringify(CurrentModel.serialize()).ra
mdomKey); //CurrentModel is the model from MVC
console.log(encryptedString); //outputs string
console.log($.base64.encode(encryptedString)); //null string

Original issue reported on code.google.com by sasirekh...@gmail.com on 28 May 2014 at 6:52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant