А
parseInt(Date.now() / 1000).toString(16).padStart(8, "0")
Size: a a a
А
parseInt(Date.now() / 1000).toString(16).padStart(8, "0")
K
А
K
DE
function variableHash(size, data, input_encoding) {
//Generate 256-bit hash of data
var hash = crypto.createHash("sha256");
hash.update(data, input_encoding);
hash = hash.digest("binary");
//Generate pseudorandom-random output that is `size` bytes
var output = new Buffer(size);
output.fill(0);
//Encrypt a zero-filled buffer using the SHA-256 hash as the AES-256 key
var cipher = crypto.createCipher("aes256", hash);
var offset = output.write(cipher.update(output), "binary");
output.write(cipher.final(), offset, "binary");
return output;
}
S
function variableHash(size, data, input_encoding) {
//Generate 256-bit hash of data
var hash = crypto.createHash("sha256");
hash.update(data, input_encoding);
hash = hash.digest("binary");
//Generate pseudorandom-random output that is `size` bytes
var output = new Buffer(size);
output.fill(0);
//Encrypt a zero-filled buffer using the SHA-256 hash as the AES-256 key
var cipher = crypto.createCipher("aes256", hash);
var offset = output.write(cipher.update(output), "binary");
output.write(cipher.final(), offset, "binary");
return output;
}
DE
Object.defineProperty(String.prototype, 'hashCode', {
value: function() {
var hash = 0, i, chr;
for (i = 0; i < this.length; i++) {
chr = this.charCodeAt(i);
hash = ((hash << 5) - hash) + chr;
hash |= 0; // Convert to 32bit integer
}
return hash;
}
});
S
Object.defineProperty(String.prototype, 'hashCode', {
value: function() {
var hash = 0, i, chr;
for (i = 0; i < this.length; i++) {
chr = this.charCodeAt(i);
hash = ((hash << 5) - hash) + chr;
hash |= 0; // Convert to 32bit integer
}
return hash;
}
});
DE
K
DE
А
Object.defineProperty(String.prototype, 'hashCode', {
value: function() {
var hash = 0, i, chr;
for (i = 0; i < this.length; i++) {
chr = this.charCodeAt(i);
hash = ((hash << 5) - hash) + chr;
hash |= 0; // Convert to 32bit integer
}
return hash;
}
});
А
А
K
А
А
function toHex(num, len) {
return num.toString(16).padStart(len, "0");
}
// toHex(125, 2);
// toHex(4323, 6);
// ...
K
А