0

I have written a java utility for key pair generation for RSA encryption. But to encrypt the password, I have to do it in client side javascript

Does anyone has a sample code to do that in javascript? Where I can just pass the public key and the password (string) and get the encrypted password back ? Badly need this.

I tried jCryption and http://www.ohdave.com/rsa/ but couldn't make much out of it. :(

The application doesn't have SSL. Any other secure encryption method/procedure/library will be most welcome.

1 Answer 1

1

I have used bits of this beginning implementation of C# in javascript for other pieces and seen correct results. It does have RSA already.

http://www.codeproject.com/KB/tips/JocysComJavaScriptClasses.aspx

You can instantiate it the same as C# calls (for the most part). Since you have JAVA experience, it shouldn't be a large learning curve.

I don't know if it's required for the RSA, but on some functions I've used; you have to convert to a binary array before using a portion to get the right example. (Such as the MD5 or SHA1)

Hope that helps.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.