From 9144166ecc44f53c2f4119d74cbf1d3f88100630 Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Fri, 13 Nov 2015 17:05:18 -0500 Subject: [PATCH] Fix typo with utf-8 -> utf8 The default encoding is utf8, and hence specifying utf-8 would achieve the same result. https://nodejs.org/api/buffer.html#buffer_buffer https://nodejs.org/docs/latest-v0.12.x/api/buffer.html#buffer_buffer https://nodejs.org/docs/latest-v0.10.x/api/buffer.html#buffer_buffer --- lib/bitauth-common.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bitauth-common.js b/lib/bitauth-common.js index f1d0de2..195ab2e 100644 --- a/lib/bitauth-common.js +++ b/lib/bitauth-common.js @@ -85,7 +85,7 @@ BitAuth.getSinFromPublicKey = function(pubkey) { BitAuth.sign = function(data, privkey) { var dataBuffer; if (!Buffer.isBuffer(data)) { - dataBuffer = new Buffer(data, 'utf-8'); + dataBuffer = new Buffer(data, 'utf8'); } else { dataBuffer = data; } @@ -105,7 +105,7 @@ BitAuth.sign = function(data, privkey) { BitAuth.verifySignature = function(data, pubkey, hexsignature, callback) { var dataBuffer; if (!Buffer.isBuffer(data)) { - dataBuffer = new Buffer(data, 'utf-8'); + dataBuffer = new Buffer(data, 'utf8'); } else { dataBuffer = data; }