junkurihara/jscu

View on GitHub
packages/js-crypto-hash/src/hash.ts

Summary

Maintainability
A
3 hrs
Test Coverage

Showing 2 of 2 total issues

Function compute has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

export const compute = async (msg: Uint8Array, hash: HashTypes = 'SHA-256') : Promise<Uint8Array> => {
const env = util.getCrypto();
 
let msgHash;
let errMsg;
Severity: Minor
Found in packages/js-crypto-hash/src/hash.ts - About 2 hrs to fix

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

export const compute = async (msg: Uint8Array, hash: HashTypes = 'SHA-256') : Promise<Uint8Array> => {
const env = util.getCrypto();
 
let msgHash;
let errMsg;
Severity: Minor
Found in packages/js-crypto-hash/src/hash.ts - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status