File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ export const baseEncodeTables = {
1414export type BaseEncoding = keyof typeof baseEncodeTables ;
1515export type DigestType = `base${BaseEncoding } `;
1616
17+ /**
18+ * @param uint32Array - Treated as a long base-0x100000000 number, little endian
19+ * @param divisor - The divisor
20+ * @return Modulo (remainder) of the division
21+ */
1722function divmod32 ( uint32Array : Uint32Array , divisor : number ) : number {
1823 let carry = 0 ;
1924 for ( let i = uint32Array . length - 1 ; i >= 0 ; i -- ) {
Original file line number Diff line number Diff line change @@ -15,10 +15,10 @@ export const MAX_SHORT_STRING: number = Math.floor((65536 - 64) / 4) & ~3;
1515
1616export class WasmHash implements IHashLike {
1717 /**
18- * @param { WebAssembly.Instance } instance wasm instance
19- * @param { WebAssembly.Instance[] } instancesPool pool of instances
20- * @param { number } chunkSize size of data chunks passed to wasm
21- * @param { number } digestSize size of digest returned by wasm
18+ * @param instance - wasm instance
19+ * @param instancesPool - pool of instances
20+ * @param chunkSize - size of data chunks passed to wasm
21+ * @param digestSize - size of digest returned by wasm
2222 */
2323 exports : any ;
2424 mem : Buffer ;
@@ -51,9 +51,9 @@ export class WasmHash implements IHashLike {
5151 }
5252
5353 /**
54- * @param { Buffer | string } data data
55- * @param { BufferEncoding= } encoding encoding
56- * @returns { this } itself
54+ * @param data - data
55+ * @param encoding - encoding
56+ * @returns itself
5757 */
5858 update ( data : Buffer | string , encoding : BufferEncoding ) : this {
5959 if ( typeof data === "string" ) {
@@ -128,8 +128,7 @@ export class WasmHash implements IHashLike {
128128 }
129129
130130 /**
131- * @param {Buffer } data data
132- * @returns {void }
131+ * @param data - data
133132 */
134133 _updateWithBuffer ( data : Buffer ) : void {
135134 const { exports, buffered, mem } = this ;
You can’t perform that action at this time.
0 commit comments