Skip to content

support for encodings in sign#2

Open
mafintosh wants to merge 1 commit intomcavage:masterfrom
mafintosh:sign-encoding
Open

support for encodings in sign#2
mafintosh wants to merge 1 commit intomcavage:masterfrom
mafintosh:sign-encoding

Conversation

@mafintosh
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant