샘플
Distinguish TypeError from ValueError for invalid RSA serialization encodings in cryptography 47.0.0
sha256:1d1d614138606e1bc6d92649926179826b98180cdcb6e6a1971b1d11be320f69
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Distinguish TypeError from ValueError for invalid RSA serialization encodings in cryptography 47.0.0 HOW
- 패키지
- cffi 2.0.0 cryptography 47.0.0 pycparser 3.0
- 환경
- python
- 생성일
- 2026-08-17T02:11:46Z
흔히 이렇게 알고 있다
Developers typically expect invalid RSA serialization argument combinations to raise ValueError.
이 샘플의 작성자가 여기서 개발자나 모델이 기대할 법한 내용으로 적어둔 것이다. 아래 계약이 실제로 실행된 것이다.
컨트랙트
- Passing `Encoding.OpenSSH` to RSA `public_bytes()` raises `TypeError`, not `ValueError`.
- Passing `Encoding.Raw` to RSA `private_bytes(..., PrivateFormat.PKCS8, ...)` also raises `TypeError`.
- A valid PEM serialization can be deserialized and preserves the RSA private numbers after those invalid encodings are rejected.
파일
- NOTES.md
- csx.json
- requirements.txt
- test/contract.py
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- python 3.12 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9