Merge pull request #149 from Robert-Nelson/example

Update example to work with current code
This commit is contained in:
Tankred Hase 2014-01-10 14:04:35 -08:00
commit c8ced71f5f
2 changed files with 20 additions and 3 deletions

View File

@ -1,9 +1,8 @@
function encrypt() {
if (window.crypto.getRandomValues) {
require("./openpgp.min.js");
openpgp.init();
var pub_key = openpgp.read_publicKey($('#pubkey').text());
$('#message').val(openpgp.write_encrypted_message(pub_key,$('#message').val()));
var pub_key = openpgp.key.readArmored($('#pubkey').text());
$('#message').val(openpgp.encryptMessage(pub_key.keys,$('#message').val()));
window.alert("This message is going to be sent:\n" + $('#message').val());
return true;
} else {

18
example/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long