polkadot-js/common

View on GitHub
packages/util-crypto/src/xxhash/xxhash64.ts

Summary

Maintainability
A
2 hrs
Test Coverage

Function init has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function init (seed: bigint, input: Uint8Array): State {
  const state = {
    seed,
    u8a: new Uint8Array(32),
    u8asize: 0,
Severity: Minor
Found in packages/util-crypto/src/xxhash/xxhash64.ts - About 1 hr to fix

    Function xxhash64 has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function xxhash64 (input: Uint8Array, initSeed: bigint | number): Uint8Array {
      const { seed, u8a, u8asize, v1, v2, v3, v4 } = init(BigInt(initSeed), input);
      let p = 0;
      let h64 = U64 & (BigInt(input.length) + (
        input.length >= 32
    Severity: Minor
    Found in packages/util-crypto/src/xxhash/xxhash64.ts - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status