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

{
  "context": "This criteria evaluates how well the engineer uses @stablelib/sha256 to implement a buffer hash processor that processes only valid portions of fixed-size buffers. The focus is on correct usage of the update method's optional dataLength parameter to handle partial buffer processing.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "SHA256 class usage",
      "description": "Creates and uses an instance of the SHA256 class to perform incremental hashing",
      "max_score": 20
    },
    {
      "name": "update() method calls",
      "description": "Calls the update() method to add data chunks to the hash computation",
      "max_score": 15
    },
    {
      "name": "dataLength parameter usage",
      "description": "Passes the actualLength parameter as the second argument to update() to specify exact number of valid bytes to process from each buffer",
      "max_score": 35
    },
    {
      "name": "digest() method usage",
      "description": "Calls digest() method to finalize and retrieve the hash result",
      "max_score": 10
    },
    {
      "name": "reset() method usage",
      "description": "Calls reset() method to clear the hasher state for reuse with new data",
      "max_score": 10
    },
    {
      "name": "Hash output conversion",
      "description": "Converts the digest output (Uint8Array) to hexadecimal string format as required by the API",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-stablelib--sha256

tile.json