Simple implementation of JCryption plugin for JQuery (Encrypting form data values)
Instruction
- Generate your own private and public key here: http://travistidwell.com/jsencrypt/demo/index.html
- Goto applications/third_party/jcryption/keys/
- modify the contents of the 2 pem files with the one you have generated
- Open the jquery.jcryption.3.1.0.js and set the getKeyControllerURL with the correct CI project url and default controller eg(http://localhost/rsa/rsa/) where the second rsa is the default controller
- Controller PART:
in the top of your controller file paste this following code
input->is_ajax_request()){ $jc_obj = new JCryption(APPPATH.'third_party/jcryption/keys/rsa_1024_pub.pem', APPPATH.'third_party/jcryption/keys/rsa_1024_priv.pem'); $jc_obj->go(); }else{ echo 'Direct access not allowed.'; } }