fix aes tests.

This commit is contained in:
Christopher Jeffrey 2016-06-27 02:20:27 -07:00
parent 70b83f22fa
commit b8997c9212
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
4 changed files with 4 additions and 6 deletions

View File

@ -135,7 +135,7 @@ TXDB.prototype._testFilter = function _testFilter(addresses) {
// Outputs: Technically uniqified by ID, but id/name works too.
// What they need (api):
// outputs: [ - SAME AS OUTPUTS ABOVE!!!
// outputs: [
// // Sum of value:
// { value: 0, id: wallet-id, name: account, index: account }
// ]
@ -305,8 +305,6 @@ TXDB.prototype.getMap = function getMap(tx, callback) {
map = WalletMap.fromTX(table, tx);
utils.print(map.toJSON());
return callback(null, map);
});
};

View File

@ -8,7 +8,7 @@ var crypto = require('crypto');
describe('AES', function() {
function pbkdf2key(passphrase, iterations, dkLen, ivLen, alg) {
var key = utils.pbkdf2(passphrase, '', iterations, dkLen + ivLen, 'sha512');
var key = utils.pbkdf2Sync(passphrase, '', iterations, dkLen + ivLen, 'sha512');
return {
key: key.slice(0, dkLen),
iv: key.slice(dkLen, dkLen + ivLen)

View File

@ -90,7 +90,8 @@ describe('HD', function() {
var master, child1, child2, child3, child4, child5, child6;
it('should create a pbkdf2 seed', function() {
var checkSeed = bcoin.utils.pbkdf2(phrase, 'mnemonic' + 'foo', 2048, 64, 'sha512').toString('hex');
var checkSeed = bcoin.utils.pbkdf2Sync(
phrase, 'mnemonic' + 'foo', 2048, 64, 'sha512').toString('hex');
assert.equal(checkSeed, seed);
});

View File

@ -873,7 +873,6 @@ describe('Wallet', function() {
assert.ifError(err);
w1.master.stop();
w1.master.key = null;
utils.print(w1.toJSON());
// Coinbase
var t1 = bcoin.mtx()