gnupg - using kbpgp • how do I specify which key-pair to encrypt_with when calling kbpgp.box(params,cb) -


var params = {   msg:         "if see me, working.",   encrypt_for: bob,   sign_with: alice };  // bob , alice keymanager objects public , unlocked private keys  kbpgp.box(params, function(err, result_string, result_buffer) {   console.log('\nencrypted message\n===========')   console.log(result_string) }) 

in snippet can specify keypair using sign.

how specify keymanager object want encrypt message with, not sign?

is there encrypt_with option missing?

that's encrypt_for parameter, expects keymanager wrapping recipient's public key.

the correct comment above kbpgp.box() call be:

// bob , alice keymanager objects public , unlocked private keys, respectively

in order sign, need unlocked private key. in order encrypt, need public key.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

node.js - How to abort query on demand using Neo4j drivers -