Merge pull request #149 from Robert-Nelson/example
Update example to work with current code
This commit is contained in:
commit
c8ced71f5f
|
@ -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
18
example/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user