Added 'JA4 Fingerprint' operation

This commit is contained in:
n1474335 2024-03-27 18:02:17 +00:00
parent 0026d77b7b
commit ef59634c15
No known key found for this signature in database
GPG key ID: D15457B7B4AF3F37
7 changed files with 1086 additions and 3 deletions

View file

@ -18,12 +18,23 @@ export default class Stream {
* Stream constructor.
*
* @param {Uint8Array} input
* @param {number} pos
* @param {number} bitPos
*/
constructor(input) {
constructor(input, pos=0, bitPos=0) {
this.bytes = input;
this.length = this.bytes.length;
this.position = 0;
this.bitPos = 0;
this.position = pos;
this.bitPos = bitPos;
}
/**
* Clone this Stream returning a new identical Stream.
*
* @returns {Stream}
*/
clone() {
return new Stream(this.bytes, this.position, this.bitPos);
}
/**