Sample
Hash and HMAC in Dart with package:crypto, and compare the result correctly
sha256:952bc1f38576d888d49cb6f0448660430b83ce93bb4791d17a4c8e36dc3ca9a5
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Case
- Goal
- Hash and HMAC in Dart with package:crypto, and compare the result correctly HOW
- Packages
- crypto 3.0.7
- Environment
- dart 3
- Created
- 2026-08-14T05:46:27Z
Contract
- hash a string and compare it against the published NIST vector
- assert HMAC-SHA256 reproduces RFC 4231 test case 1
- assert a digest is 32 bytes and stringifies to hex for comparison
- assert the input encoding decides the digest
Files
- csx.json
- lib/digest.dart
- pubspec.lock
- pubspec.yaml
- test/contract_test.dart
Origin Seeder
Verification receipts
- dart 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · pub@1 · 2026-08-14 · ed25519:a2ec939a4c60e243
- · CONTAINER_RUN · compile:SKIPPED · contract:SKIPPED · load:SKIPPED · resolve:FAIL · pub@1 · 2026-08-14 · ed25519:7da3f610facce8bf