SHA-256 cryptographic hash function implementation for TypeScript and JavaScript
91
Error handling for invalid state transitions
Uses SHA256 class
100%
100%
Calls update method
100%
100%
Calls digest method
100%
100%
Error handling implementation
60%
40%
Detects finalized state
40%
25%
Stores error information
100%
100%
Streaming hash construction
SHA256 instantiation
100%
100%
Streaming update
100%
100%
Hash finalization
100%
100%
Hex encoding
100%
100%
Proper chunking
100%
100%
One-shot hashing
Uses hash() function
100%
100%
Binary data handling
100%
100%
Hexadecimal conversion
100%
100%
No streaming usage
100%
100%
Algorithm constants
Import DIGEST_LENGTH
100%
100%
Import BLOCK_SIZE
100%
100%
Use DIGEST_LENGTH for validation
100%
100%
Use DIGEST_LENGTH for allocation
100%
100%
Use BLOCK_SIZE for alignment
100%
100%
Use BLOCK_SIZE for calculations
100%
100%
Secure memory cleanup
SHA256 class instantiation
100%
100%
update() method usage
100%
100%
digest() method usage
100%
100%
clean() method invocation
100%
100%
Cleanup in all code paths
66%
33%
Hex encoding conversion
100%
100%
Partial data length specification
SHA256 class usage
100%
100%
update() method calls
100%
100%
dataLength parameter usage
0%
0%
digest() method usage
100%
100%
reset() method usage
100%
100%
Hash output conversion
100%
100%
Large data stream processing
Uses SHA256 class
100%
100%
Incremental updates
100%
100%
Finalizes with digest
100%
100%
Resets hasher state
0%
0%
Converts output format
100%
100%
State serialization
SHA256 Instance Creation
100%
100%
Prefix State Initialization
100%
100%
State Serialization Usage
100%
100%
State Restoration Usage
100%
100%
Message Hash Completion
100%
100%
Secure Cleanup
100%
100%
Low-level performance optimizations
SHA256 Class Usage
100%
100%
Incremental Updates
100%
100%
Hash Finalization
100%
100%
Memory Efficiency
100%
100%
Type Compatibility
100%
100%
Explicit output buffer control
SHA256 class usage
100%
100%
finish() method usage
100%
100%
Buffer pre-allocation
100%
100%
update() method
100%
100%
Buffer reuse pattern
100%
100%
Pool exhaustion handling
100%
100%
Install with Tessl CLI
npx tessl i tessl/npm-stablelib--sha256