packages/js-crypto-hash/src/hash.ts
Showing 2 of 2 total issues
Function compute
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
Open
export const compute = async (msg: Uint8Array, hash: HashTypes = 'SHA-256') : Promise<Uint8Array> => { const env = util.getCrypto(); let msgHash; let errMsg;
- Read upRead up
Function compute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const compute = async (msg: Uint8Array, hash: HashTypes = 'SHA-256') : Promise<Uint8Array> => { const env = util.getCrypto(); let msgHash; let errMsg;