aws / aws-sdk-js-crypto-helpers
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 38 units with 381 lines of code in units (21.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 0 simple units (0 lines of code)
    • 38 very simple units (381 lines of code)
0% | 0% | 0% | 0% | 100%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
ts0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/sha1-browser0% | 0% | 0% | 0% | 100%
packages/sha256-browser0% | 0% | 0% | 0% | 100%
packages/supports-web-crypto0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
packages/random-source-browser0% | 0% | 0% | 0% | 100%
packages/sha256-js0% | 0% | 0% | 0% | 100%
packages/util0% | 0% | 0% | 0% | 100%
packages/sha256-universal0% | 0% | 0% | 0% | 100%
packages/ie11-detection0% | 0% | 0% | 0% | 100%
packages/random-source-node0% | 0% | 0% | 0% | 100%
packages/crc32c0% | 0% | 0% | 0% | 100%
packages/crc320% | 0% | 0% | 0% | 100%
packages/random-source-universal0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
constructor()
in packages/sha256-js/src/jsSha256.ts
17 4 1
export function randomValues()
in packages/random-source-browser/src/index.ts
9 3 1
export function randomValuesOnly()
in packages/random-source-browser/src/index.ts
9 3 1
export function supportsWebCrypto()
in packages/supports-web-crypto/src/supportsWebCrypto.ts
10 3 1
export function supportsSecureRandom()
in packages/supports-web-crypto/src/supportsWebCrypto.ts
7 3 1
export async function supportsZeroByteGCM()
in packages/supports-web-crypto/src/supportsWebCrypto.ts
23 3 1
export function uint32ArrayFrom()
in packages/util/src/uint32ArrayFrom.ts
12 3 1
constructor()
in packages/sha1-browser/src/crossPlatformSha1.ts
9 3 1
constructor()
in packages/sha256-browser/src/crossPlatformSha256.ts
9 3 1
export function isMsWindow()
in packages/ie11-detection/src/MsWindow.ts
10 3 1
11 3 1
export function supportsSubtleCrypto()
in packages/supports-web-crypto/src/supportsWebCrypto.ts
8 2 1
update()
in packages/crc32c/src/aws_crc32c.ts
4 2 1
export function isEmptyData()
in packages/util/src/isEmptyData.ts
6 2 1
export function randomValues()
in packages/random-source-universal/src/index.ts
6 2 1
constructor()
in packages/sha256-universal/src/index.ts
7 2 1
function supportsCryptoModule()
in packages/sha256-universal/src/index.ts
7 2 0
constructor()
in packages/sha1-browser/src/webCryptoSha1.ts
16 2 1
export function isEmptyData()
in packages/sha1-browser/src/isEmptyData.ts
6 2 1
constructor()
in packages/sha1-browser/src/ie11Sha1.ts
15 2 1