PKI key ring for your browser forms
GPL-3.0 License
#jQuery plugin to impliment RSA public key encryption
Utilizes the pidCrypt libraries for client public key encryption while the associated PHP class uses OpenSSL to generate the necessary private/public key pairs used by this plug-in
Fork me @ https://www.github.com/jas-/jQuery.pidCrypt
Here is an screenshot of an impelmentation bound to a form with multiple public keys forcing a modal window pop-up along with debugging output at the bottom showing the encrypted public keys stored within the HTML5 storage options.
Here are a few usage examples to get you started
Default usage using HTML5 localStorage
$('#form').pidCrypt();
Default Using HTML5 sessionStorage
$('#form').pidCrypt({storage:'sessionStorage'});
Default using cookies (requires the jQuery cookie plug-in)
$('#form').pidCrypt({storage:'cookie'});
Example of using the callback method to process server response
$('#form').pidCrypt({callback:function(){ console.log(this); }});
Example of using the preCallback method to load a function prior to form submission
$('#form').pidCrypt({preCallback:function(){ console.log(this); }});
Example of using the errCallback method to load a function on error
$('#form').pidCrypt({preCallback:function(){ console.log(this); }});
Example of enabling a custom CSRF token (sets the X-Alt-Referer header value)
$('#form').pidCrypt({appID:'<?php echo $_SESSION['csrf-token']; ?>'});
Author: Jason Gerfen [email protected] License: GPL (see LICENSE)