Update README.md
This commit is contained in:
parent
151e07e16c
commit
3588ef8f18
|
@ -203,7 +203,8 @@ var privkey = '-----BEGIN PGP PRIVATE KEY BLOCK ... END PGP PRIVATE KEY BLOCK---
|
||||||
var passphrase = 'secret passphrase'; //what the privKey is encrypted with
|
var passphrase = 'secret passphrase'; //what the privKey is encrypted with
|
||||||
|
|
||||||
var privKeyObj = openpgp.key.readArmored(privkey).keys[0];
|
var privKeyObj = openpgp.key.readArmored(privkey).keys[0];
|
||||||
privKeyObj.decrypt(passphrase);```
|
privKeyObj.decrypt(passphrase);
|
||||||
|
```
|
||||||
|
|
||||||
```js
|
```js
|
||||||
options = {
|
options = {
|
||||||
|
@ -218,6 +219,7 @@ openpgp.sign(options).then(function(signed) {
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
options = {
|
options = {
|
||||||
message: openpgp.cleartext.readArmored(cleartext), // parse armored message
|
message: openpgp.cleartext.readArmored(cleartext), // parse armored message
|
||||||
|
|
Loading…
Reference in New Issue
Block a user