SHA-256 cryptographic hash function implementation for TypeScript and JavaScript
91
{
"context": "This criteria evaluates how well the engineer uses @stablelib/sha256's streaming hash capabilities to process large files efficiently. The focus is on proper usage of the SHA256 class for incremental hashing rather than one-shot hashing, demonstrating understanding of memory-efficient large data processing.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses SHA256 class",
"description": "Creates instances of the SHA256 class (via 'new SHA256()') for streaming hash construction rather than using the one-shot hash() function",
"max_score": 30
},
{
"name": "Incremental updates",
"description": "Calls the update() method multiple times to process data chunks incrementally as they are read from files",
"max_score": 25
},
{
"name": "Finalizes with digest",
"description": "Calls the digest() method to retrieve the final hash after all chunks have been processed",
"max_score": 20
},
{
"name": "Resets hasher state",
"description": "Calls the reset() method to reuse the same SHA256 instance when processing multiple files sequentially",
"max_score": 15
},
{
"name": "Converts output format",
"description": "Converts the Uint8Array digest output to hexadecimal string format for the return value",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-stablelib--sha256docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10