CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-stablelib--sha256

SHA-256 cryptographic hash function implementation for TypeScript and JavaScript

91

0.98x
Overview
Eval results
Files

rubric.jsonevals/scenario-3/

{
  "context": "This criteria evaluates how well the engineer uses the @stablelib/sha256 package to implement one-shot hashing for file integrity verification. The focus is on correct usage of the hash() function and proper handling of binary data.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses hash() function",
      "description": "Uses the hash() function from @stablelib/sha256 to compute the SHA-256 digest in a single operation",
      "max_score": 40
    },
    {
      "name": "Binary data handling",
      "description": "Correctly passes Uint8Array or Buffer to the hash() function (file contents must be read as binary data, not as a string)",
      "max_score": 25
    },
    {
      "name": "Hexadecimal conversion",
      "description": "Converts the digest output (Uint8Array) to a hexadecimal string representation for the return value",
      "max_score": 25
    },
    {
      "name": "No streaming usage",
      "description": "Does not use the SHA256 class with update() and digest() methods (should use one-shot hash() function instead as appropriate for this use case)",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-stablelib--sha256

tile.json