XaskeL's encoder in JavaScript

Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
2022-06-02 17:57:53 +07:00
parent 96e9a43232
commit ce6868780d

View File

@@ -53,7 +53,8 @@ getDirectories(argv.res, (err, res) => {
const newFilePath = file + 'c';
// Encoding first $encodeSize bytes from file
const key = crypto.createHash('sha256').update(argv.pass).digest('hex').toUpperCase();
// const key = crypto.createHash('sha256').update(argv.pass).digest('hex').toUpperCase();
const key = crypto.createHash('md5').update(argv.pass).digest('hex').substring(0, 16);
const data = fs.readFileSync(file);
let array = [];
for (let i = 0; i < encodeSize; i++)