node-ssh-agent icon indicating copy to clipboard operation
node-ssh-agent copied to clipboard

support for encodings in sign

Open mafintosh opened this issue 11 years ago • 0 comments

Instead of defaulting to base64 for sign this PR defaults to buffers and adds an optional encoding parameter

agent.sign(key, new Buffer('hello world'), function(err, res) {
  // res.signature is a Buffer
})

agent.sign(key, new Buffer('hello world'), 'base64', function(err, res) {
  // res.signature is a base64 string
})

mafintosh avatar Jul 26 '14 08:07 mafintosh