SHA-256 cryptographic hash function implementation for TypeScript and JavaScript
91
{
"context": "This criteria evaluates how well the engineer uses @stablelib/sha256's error handling capabilities, specifically understanding and properly handling invalid state transitions when a hash has been finalized and cannot accept further updates.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses SHA256 class",
"description": "Creates and uses instances of the SHA256 class from @stablelib/sha256 for hash state management",
"max_score": 15
},
{
"name": "Calls update method",
"description": "Uses the update() method to add data to the hash state during processing",
"max_score": 15
},
{
"name": "Calls digest method",
"description": "Uses the digest() method to finalize the hash and retrieve the hash value",
"max_score": 15
},
{
"name": "Error handling implementation",
"description": "Implements try-catch blocks to catch errors thrown when attempting to update a finalized hash",
"max_score": 25
},
{
"name": "Detects finalized state",
"description": "Correctly detects that errors occur when calling update() on a hash after digest() has been called, and handles this scenario appropriately",
"max_score": 20
},
{
"name": "Stores error information",
"description": "Captures and stores error messages from caught exceptions for debugging or reporting purposes",
"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