|
@ -26,15 +26,7 @@ function wordArrayToBuffer(wordArray) { |
|
|
return buffer |
|
|
return buffer |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function reverseEndian(hex) { |
|
|
|
|
|
var buffer = new Buffer(hex, 'hex') |
|
|
|
|
|
Array.prototype.reverse.call(buffer) |
|
|
|
|
|
|
|
|
|
|
|
return buffer.toString('hex') |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
module.exports = { |
|
|
module.exports = { |
|
|
bufferToWordArray: bufferToWordArray, |
|
|
bufferToWordArray: bufferToWordArray, |
|
|
wordArrayToBuffer: wordArrayToBuffer, |
|
|
wordArrayToBuffer: wordArrayToBuffer |
|
|
reverseEndian: reverseEndian |
|
|
|
|
|
} |
|
|
} |
|
|