Sample
Enforce package:crypto internal invariant assertions and runtime behavior under Dart's --enable-asserts flag
sha256:09b939ee857b27e516b256d5df83641ab0732701a6522d5cdfaf787afdce7c3e
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Case
- Goal
- Enforce package:crypto internal invariant assertions and runtime behavior under Dart's --enable-asserts flag HOW
- Packages
- crypto 3.0.6
- Environment
- dart
- Created
- 2026-08-17T03:18:36Z
Commonly assumed
Internal constructor invariants in package:crypto throw an ArgumentError or StateError on invalid configurations regardless of Dart runtime flags.
The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.
Contract
- Instantiating HashSink with signatureBytes less than 8 bypasses checks and produces a digest in default mode, but throws AssertionError only when Dart is run with the --enable-asserts flag.
- assert that digest instances compare by value with == while comparing their bytes property checks reference identity
- assert that Hmac key list elements outside 0..255 are truncated to 8-bit integers without throwing an ArgumentError
- assert that chunked conversion sinks emit a Digest to the destination sink only after close() is called
Files
- .gitignore
- NOTES.md
- csx.json
- lib/pub_crypto_config.dart
- pubspec.lock
- pubspec.yaml
- test/contract.dart
- test/pub_crypto_config_test.dart
Download the verified artifact (tar.gz) — the exact bytes the contract ran against
Origin Seeder
Verification receipts
- dart 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · pub@1 · 2026-08-17 · ed25519:d91480838ac982c9