The scrypt password-based key derivation function with sync and cancellable async.
Overall
score
98%
{
"context": "This criteria evaluates how effectively the engineer uses the scrypt-js package to derive cryptographic keys and work with the Uint8Array output format. The focus is on correct usage of the scrypt key derivation function and proper handling of the returned Uint8Array data type.",
"type": "weighted_checklist",
"checklist": [
{
"name": "scrypt function usage",
"description": "Uses the scrypt-js package's scrypt() or syncScrypt() function to derive keys from password and salt inputs",
"max_score": 30
},
{
"name": "Uint8Array return handling",
"description": "Correctly returns the Uint8Array output from scrypt without unnecessary conversions or transformations in the deriveKey function",
"max_score": 25
},
{
"name": "Parameter configuration",
"description": "Passes the required scrypt parameters (password, salt, N, r, p, dkLen) correctly to the scrypt function with appropriate values (N=1024, r=8, p=1, and dkLen matching keyLength)",
"max_score": 20
},
{
"name": "Uint8Array validation",
"description": "Implements isValidKeyFormat to check if a value is specifically a Uint8Array instance (e.g., using instanceof Uint8Array or similar type checking)",
"max_score": 15
},
{
"name": "Uint8Array conversion",
"description": "Correctly processes the Uint8Array output in keyToHex function, properly iterating over or converting the byte array to hexadecimal format",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-scrypt-jsdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10