mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 14:44:40 +02:00
* Buffer froms that should be allocs
* Remove unnecessary Buffer fill after alloc * minor cleanup on fnv1a.js
This commit is contained in:
parent
0d7676a871
commit
b45a6a8743
3 changed files with 6 additions and 6 deletions
|
@ -38,7 +38,7 @@ module.exports = class FNV1a {
|
|||
|
||||
digest(encoding) {
|
||||
encoding = encoding || 'binary';
|
||||
let buf = Buffer.alloc(4);
|
||||
const buf = Buffer.alloc(4);
|
||||
buf.writeInt32BE(this.hash & 0xffffffff, 0);
|
||||
return buf.toString(encoding);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue