From 5515fa6c492082d79769c61d5b6ce501fb11a19a Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Mon, 21 Apr 2014 21:23:30 +1000 Subject: [PATCH] Removes convert module usage --- test/message.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/message.js b/test/message.js index b66cd16..c4cda2e 100644 --- a/test/message.js +++ b/test/message.js @@ -1,5 +1,4 @@ var assert = require('assert') -var convert = require('../').convert var ECKey = require('../src/eckey').ECKey var Message = require('../').Message @@ -17,8 +16,8 @@ describe('Message', function() { addr = '16UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM' // uncompressed caddr = '1PMycacnJaSqwwJqjawXBErnLsZ7RkXUAs' // compressed - sig = convert.hexToBytes('1bc25ac0fb503abc9bad23f558742740fafaec1f52deaaf106b9759a5ce84c93921c4a669c5ec3dfeb7e2d7d177a2f49db407900874f6de2f701a4c16783776d8d') - csig = convert.hexToBytes('1fc25ac0fb503abc9bad23f558742740fafaec1f52deaaf106b9759a5ce84c93921c4a669c5ec3dfeb7e2d7d177a2f49db407900874f6de2f701a4c16783776d8d') + sig = new Buffer('1bc25ac0fb503abc9bad23f558742740fafaec1f52deaaf106b9759a5ce84c93921c4a669c5ec3dfeb7e2d7d177a2f49db407900874f6de2f701a4c16783776d8d', 'hex') + csig = new Buffer('1fc25ac0fb503abc9bad23f558742740fafaec1f52deaaf106b9759a5ce84c93921c4a669c5ec3dfeb7e2d7d177a2f49db407900874f6de2f701a4c16783776d8d', 'hex') }) it('can verify a signed message', function() { @@ -38,7 +37,7 @@ describe('Message', function() { it('supports alternate network addresses', function() { var taddr = 'mxnQZKxSKjzaMgrdXzk35rif3u62TLDrg9' - var tsig = convert.base64ToBytes('IGucnrTku3KLCCHUMwq9anawfrlN8RK1HWMN+10LhsHJeysBdWfj5ohJcS/+oqrlVFNvEgbgEeAQUL6r3sZwnj8=') + var tsig = new Buffer('IGucnrTku3KLCCHUMwq9anawfrlN8RK1HWMN+10LhsHJeysBdWfj5ohJcS/+oqrlVFNvEgbgEeAQUL6r3sZwnj8=', 'base64') assert.ok(Message.verify(taddr, tsig, msg)) assert.ok(!Message.verify(taddr, tsig, 'foobar'))