CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-scrypt-js

The scrypt password-based key derivation function with sync and cancellable async.

Overall
score

98%

Overview
Eval results
Files

rubric.jsonevals/scenario-2/

{
  "context": "This criteria evaluates the engineer's ability to use the scrypt-js package for asynchronous key derivation with Promise support. It focuses specifically on proper usage of the async API, handling of input/output formats, and progress tracking capabilities.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Async scrypt function",
      "description": "Uses the scrypt() function (not syncScrypt()) for asynchronous key derivation that returns a Promise",
      "max_score": 25
    },
    {
      "name": "Promise handling",
      "description": "Properly returns the Promise from scrypt() and handles it with .then()/.catch() or async/await patterns",
      "max_score": 15
    },
    {
      "name": "Password encoding",
      "description": "Correctly converts the password string to an appropriate buffer-like format (e.g., using Buffer.from() or converting to Uint8Array)",
      "max_score": 15
    },
    {
      "name": "Salt conversion",
      "description": "Properly converts the hexadecimal salt string to a buffer-like format (e.g., using Buffer.from(salt, 'hex') or equivalent)",
      "max_score": 15
    },
    {
      "name": "Correct parameters",
      "description": "Passes all required parameters to scrypt() in correct order: password, salt, N, r, p, dkLen with the specified values (N=16384, r=8, p=1, dkLen=32)",
      "max_score": 15
    },
    {
      "name": "Progress callback",
      "description": "Implements and passes a progress callback function as the 7th parameter to scrypt() to track derivation progress",
      "max_score": 10
    },
    {
      "name": "Hex output conversion",
      "description": "Converts the resulting Uint8Array to a hexadecimal string (e.g., using Buffer.from().toString('hex') or equivalent)",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-scrypt-js

tile.json