Cryptographic/sha256 library
🔐 SHA-256 Cryptographic Hash Algorithm Implementation
A production-ready implementation of the SHA-256 hashing algorithm used in Bitcoin and many other blockchain systems. This implementation provides both single-shot hashing and streaming capabilities for large data processing.
Features:
- RFC 6234 compliant SHA-256 implementation
- Streaming support for large files and data streams
- Optimized for performance with minimal memory allocation
- Comprehensive error handling and validation
- Thread-safe implementation suitable for concurrent environments
Time complexity: O(n) where n is the length of input data Space complexity: O(1) constant space usage
Example:
final hash = SHA256.hash('Hello, World!');
print(hash); // 7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069
Classes
- SHA256
- SHA-256 hash algorithm implementation
- SHA256Constants
- SHA-256 hash constants and initial values