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-9/

{
  "context": "This criteria evaluates how well the engineer uses @stablelib/sha256's performance-optimized streaming API to implement efficient file hashing. The focus is on proper use of the SHA256 class for incremental processing and understanding the package's design for high-performance scenarios.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "SHA256 Class Usage",
      "description": "Creates an instance of the SHA256 class (e.g., new SHA256()) to perform hash computation, rather than attempting to use the one-shot hash() function for streaming scenarios.",
      "max_score": 25
    },
    {
      "name": "Incremental Updates",
      "description": "Uses the update() method to process file data in chunks incrementally, feeding each chunk to the hasher as it's read from disk.",
      "max_score": 25
    },
    {
      "name": "Hash Finalization",
      "description": "Calls the digest() method to retrieve the final hash digest after all data has been processed through update() calls.",
      "max_score": 20
    },
    {
      "name": "Memory Efficiency",
      "description": "Implements chunked file reading (e.g., using streams or read loops) that processes data incrementally rather than loading the entire file into memory before hashing.",
      "max_score": 20
    },
    {
      "name": "Type Compatibility",
      "description": "Correctly handles the Uint8Array type expected by the update() method, converting from Node.js Buffer or other formats if necessary.",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-stablelib--sha256

tile.json