mcavage / node-ssh-agent

Node.js client library for interacting with the OpenSSH Agent
MIT License
23 stars 9 forks source link

support for encodings in sign #2

Open mafintosh opened 10 years ago

mafintosh commented 10 years ago

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
})