Added SAL support
This commit is contained in:
15
tests/tube.js
Normal file
15
tests/tube.js
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
let u = require('../build/Release/cryptoforknote');
|
||||
|
||||
const b = Buffer.from(
|
||||
'0d0df9baecb4060567fc85623e264062d2d0593b8d63a956249d0b2588fd53111f446694b02110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000282b1d00301ffc6b0d00301b798fdd01602cee1a6bd4cce3cab8daccc0cef76dea2302af21e576c00957f8f7fd4bace7d4b34018571692c36ef35b1802ccc87b968684fa2581d7f6f634312bf4d66e2347a6c49021100000000000000000000000000000000000000'
|
||||
, 'hex');
|
||||
const b2 = u.convert_blob(b, 10);
|
||||
const h1 = b2.toString('hex');
|
||||
|
||||
if (h1 === '0d0d791d9b66000000000567fc85623e264062d2d0593b8d63a956249d0b2588fd53111f446694b02110beef88d4195143229591bb6efd2d40780d7da377d165a39afadead64e4add0b1010000000000000000') {
|
||||
console.log('PASSED');
|
||||
} else {
|
||||
console.log('FAILED: ' + h1);
|
||||
process.exit(1);
|
||||
}
|
||||
Reference in New Issue
Block a user