This file ( 747B ) exceeds the allowed full mode (48 kb) size.
The editor full hight is disabled, only scrolling is allowed..
If you wish to edit a file, it is recommended to use the scroll mode as some users do not like the full height
mode, although some users like it.
const fs = require('fs');
const crypto = require('crypto');
const fileHash = async (file, cryptoName = 'sha256') => {
return new Promise((resolve, reject) => {
const fstream = fs.createReadStream(file);
const hash = crypto.createHash(cryptoName);
fstream.on('error', reject);
fstream.on('end', function () {
hash.end();
const bytes = hash.read();
const string = require('./base').charset(bytes)
resolve(string);
});
fstream.pipe(hash);
})
}
const stringHash = (string, cryptoName = 'sha256') => {
return crypto.createHash(cryptoName).update(string).digest("hex");
}
module.exports.string = stringHash;
module.exports.file = fileHash;