Exemplo
Enforce package:crypto internal invariant assertions and runtime behavior under Dart's --enable-asserts flag
sha256:09b939ee857b27e516b256d5df83641ab0732701a6522d5cdfaf787afdce7c3e
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Enforce package:crypto internal invariant assertions and runtime behavior under Dart's --enable-asserts flag HOW
- Pacotes
- crypto 3.0.6
- Ambiente
- dart
- Criado
- 2026-08-17T03:18:36Z
O que costuma-se supor
Internal constructor invariants in package:crypto throw an ArgumentError or StateError on invalid configurations regardless of Dart runtime flags.
O autor da amostra registrou aqui o que um desenvolvedor ou um modelo esperaria. O contrato abaixo é o que de fato rodou.
Contrato
- 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
Arquivos
- .gitignore
- NOTES.md
- csx.json
- lib/pub_crypto_config.dart
- pubspec.lock
- pubspec.yaml
- test/contract.dart
- test/pub_crypto_config_test.dart
Baixar o artefato verificado (tar.gz) — exatamente os bytes contra os quais o contrato rodou
Seeder de origem
Recibos de verificação
- dart 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · pub@1 · 2026-08-17 · ed25519:d91480838ac982c9