Home Is there any encryption-decryption library working same in jquery as well as in rails?
Reply: 1

Is there any encryption-decryption library working same in jquery as well as in rails?

sank
1#
sank Published in 2017-12-30 04:00:29Z

I am looking for an encryption-decryption library which is working same on both rails and jquery. I mean I will encrypt some data in rails and then send it in response to ajax call and I want to decrypt it in jquery.

So, Is there any common library?

Ryan Hanekamp
2#
Ryan Hanekamp Reply to 2017-12-30 21:35:42Z

You don't need a common library, just a common standard. I have no trouble transferring encrypted messages between browser Javascript and Node.js or PHP based servers, on three very different libraries.

Any browser encryption for any reason should be done with the SubtleCrypto built-in library, because it uses better entropy generation and is less susceptible to timing-based attacks than third-party libraries can be. You'll want either AES-CBC for private-key encryption or RSA-OAEP for public-key encryption.

This is not a subject I'm going to delve into too deeply in a post, but be prepared for a lot of homework and testing to get everything coordinated. You'll also want a good grasp of character encodings, and you might end up with multiple manual character conversions. I have my doubts as to your intentions (I think you're completely wasting your time, for reasons already mentioned) but I prefer to give answers rather than advice. Have fun!

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.314978 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO