CodeOverload
CodeOverload

Reputation: 48525

Is there a library for both Javascript and Rails to encrypt and decrypt with a key?

I'd like to encrypt a string in the server side with a password, and decrypt it in the client side with the same password.

How to approach this?

Upvotes: 1

Views: 717

Answers (1)

alexandernst
alexandernst

Reputation: 15099

You're looking for some encryption functions. Using whichever method you want will do the job, as methods are standard and they all have implementations in most languages.

Take a look at AES for example!

JS implementation: http://code.google.com/p/crypto-js/

Ruby: https://gist.github.com/1077760

Upvotes: 2

Related Questions