diff --git a/decrypter.js b/decrypter.js new file mode 100644 index 0000000..e5ec714 --- /dev/null +++ b/decrypter.js @@ -0,0 +1,9 @@ +// npm install --save yargs + +const BOSkrypt = require('.'); + +var argv = require('yargs/yargs')(process.argv) + .string(['key', 'message']) + .argv +; +console.log(BOSkrypt.decrypt(argv.message, argv.key)) diff --git a/index.js b/index.js index d98dfcc..0cdbf9a 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,6 @@ const aesjs = require('./aes-64bit') const crc = require('node-crc') const crypto = require("crypto") -//console.log(crypto.getCiphers()) function randomIntInc(low, high) { return Math.floor(Math.random() * (high - low + 1) + low) } @@ -39,6 +38,7 @@ class BOSkrypt { .substring(0, 7) //take first 7 chars }).join('') //join to one complete string + console.log('compressedPreparedPayload', compressedPreparedPayload) let compressedPayload = [] for (let i=0;i