aws / aws-encryption-sdk-javascript
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 327 units with 5,018 lines of code in units (41.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (251 lines of code)
    • 20 simple units (887 lines of code)
    • 302 very simple units (3,880 lines of code)
0% | 0% | 5% | 17% | 77%
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% | 5% | 17% | 77%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
modules/integration-vectors0% | 0% | 57% | 0% | 42%
modules/integration-browser0% | 0% | 22% | 25% | 52%
modules/material-management0% | 0% | 9% | 10% | 79%
modules/web-crypto-backend0% | 0% | 25% | 0% | 74%
modules/kms-keyring0% | 0% | 0% | 35% | 64%
modules/cache-material0% | 0% | 0% | 48% | 51%
modules/decrypt-node0% | 0% | 0% | 42% | 57%
modules/raw-rsa-keyring-browser0% | 0% | 0% | 45% | 54%
modules/serialize0% | 0% | 0% | 14% | 85%
modules/material-management-browser0% | 0% | 0% | 30% | 69%
modules/raw-rsa-keyring-node0% | 0% | 0% | 85% | 15%
modules/example-browser0% | 0% | 0% | 0% | 100%
modules/example-node0% | 0% | 0% | 0% | 100%
modules/encrypt-node0% | 0% | 0% | 0% | 100%
modules/raw-aes-keyring-browser0% | 0% | 0% | 0% | 100%
modules/raw-aes-keyring-node0% | 0% | 0% | 0% | 100%
modules/material-management-node0% | 0% | 0% | 0% | 100%
modules/raw-keyring0% | 0% | 0% | 0% | 100%
modules/integration-node0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
modules/decrypt-browser0% | 0% | 0% | 0% | 100%
modules/kms-keyring-browser0% | 0% | 0% | 0% | 100%
modules/hkdf-node0% | 0% | 0% | 0% | 100%
modules/caching-materials-manager-browser0% | 0% | 0% | 0% | 100%
modules/kms-keyring-node0% | 0% | 0% | 0% | 100%
modules/caching-materials-manager-node0% | 0% | 0% | 0% | 100%
modules/client-browser0% | 0% | 0% | 0% | 100%
modules/client-node0% | 0% | 0% | 0% | 100%
modules/encrypt-browser0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function buildGetKeyring()
in modules/integration-vectors/src/build_get_keyring.ts
42 18 7
export async function buildDecryptFixtures()
in modules/integration-browser/src/build_decrypt_fixtures.ts
74 17 4
async function getWebCryptoBackend()
in modules/web-crypto-backend/src/backend-factory.ts
34 15 0
export function cloneMaterial()
in modules/material-management/src/clone_cryptographic_material.ts
48 15 1
export async function _getDecryptTestVectorIterator()
in modules/integration-vectors/src/get_decrypt_test_iterator.ts
53 14 1
export async function buildEncryptFixtures()
in modules/integration-browser/src/build_encrypt_fixtures.ts
53 10 5
async function pem2JWK()
in modules/integration-browser/src/decrypt_materials_manager_web_crypto.ts
32 9 3
export function parseAwsKmsKeyArn()
in modules/kms-keyring/src/arn_parsing.ts
40 9 1
export function mrkAwareAwsKmsKeyIdCompare()
in modules/kms-keyring/src/arn_parsing.ts
17 9 2
export function getEncryptionMaterials()
in modules/cache-material/src/caching_cryptographic_materials_decorators.ts
50 9 2
let pathologicalDrain:()
in modules/decrypt-node/src/decipher_stream.ts
93 9 1
constructor()
in modules/raw-rsa-keyring-node/src/raw_rsa_keyring_node.ts
68 8 1
async _onEncrypt()
in modules/kms-keyring/src/kms_keyring.ts
53 8 1
export function decorateProperties()
in modules/cache-material/src/caching_cryptographic_materials_decorators.ts
46 8 2
export function readElements()
in modules/serialize/src/read_element.ts
36 7 4
function getSubtleFunction()
in modules/material-management-browser/src/material_helpers.ts
40 7 2
constructor()
in modules/raw-rsa-keyring-browser/src/raw_rsa_keyring_web_crypto.ts
89 7 1
async _onDecrypt()
in modules/kms-keyring/src/kms_mrk_discovery_keyring.ts
57 7 2
export function decomposeAwsKmsKeyArn()
in modules/kms-keyring/src/region_from_kms_key_arn.ts
15 7 1
async _onDecrypt()
in modules/kms-keyring/src/kms_keyring.ts
47 7 2