From eb4da5f5c526e200a128ed58d09ba079dc7cb0e4 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Tue, 11 Mar 2014 12:26:59 -0700 Subject: [PATCH] remove endian code in index.js nothing is using --- src/index.js | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/src/index.js b/src/index.js index 375244f..23f281e 100644 --- a/src/index.js +++ b/src/index.js @@ -1,27 +1,3 @@ -// Bit-wise rotate left -var rotl = function (n, b) { - return (n << b) | (n >>> (32 - b)); -}; - -// Bit-wise rotate right -var rotr = function (n, b) { - return (n << (32 - b)) | (n >>> b); -}; - -// Swap big-endian to little-endian and vice versa -var endian = function (n) { - // If number given, swap endian - if (n.constructor == Number) { - return rotl(n, 8) & 0x00FF00FF | rotl(n, 24) & 0xFF00FF00; - } - - // Else, assume array and swap all items - for (var i = 0; i < n.length; i++) { - n[i] = endian(n[i]); - } - return n; -} - var Key = require('./eckey'); module.exports = { @@ -49,7 +25,5 @@ module.exports = { base58: require('./base58'), // conversions - convert: require('./convert'), - - endian: endian + convert: require('./convert') }