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