diff --git a/Key.js b/Key.js index 80187b5..21f5086 100644 --- a/Key.js +++ b/Key.js @@ -1,6 +1,5 @@ - if (process.versions) { // c++ native version module.exports = require('bindings')('KeyModule'); @@ -8,6 +7,18 @@ if (process.versions) { // pure js version var ECKey = require('./browser/bitcoinjs-lib.js').ECKey; var buffertools = require('buffertools'); + + var bufferToArray = function(buffer) { + var ret = []; + + var l = buffer.length; + for(var i =0; i