샘플
Distinguish Bun.password.verify throwing PASSWORD_UNSUPPORTED_ALGORITHM for arbitrary non-empty strings and PASSWORD_INVALID_ENCODING for malformed payloads rather than returning false
sha256:ea508eabfe658d9521fb07e9136a8dca4f4b4c634174c383130d61ce7394be4b
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Distinguish Bun.password.verify throwing PASSWORD_UNSUPPORTED_ALGORITHM for arbitrary non-empty strings and PASSWORD_INVALID_ENCODING for malformed payloads rather than returning false HOW
- 패키지
- bun 1.3.14
- 환경
- node
- 생성일
- 2026-08-17T03:15:51Z
흔히 이렇게 알고 있다
Bun.password.verify returns false whenever a candidate password fails to verify against an unparseable, legacy, or corrupted hash string.
이 샘플의 작성자가 여기서 개발자나 모델이 기대할 법한 내용으로 적어둔 것이다. 아래 계약이 실제로 실행된 것이다.
컨트랙트
- Bun.password.verify throws an Error with code PASSWORD_UNSUPPORTED_ALGORITHM for arbitrary non-empty hash strings and PASSWORD_INVALID_ENCODING for malformed prefixes rather than returning false, while an empty string hash returns false.
- Bun.password.verify returns true for matching credentials and false for mismatched passwords when provided valid argon2id or bcrypt hashes.
- Bun.password.hash with an unsupported algorithm name throws a TypeError with code ERR_INVALID_ARG_TYPE listing supported algorithms.
- Bun.password.hash with out-of-range bcrypt cost rounds throws a TypeError with code ERR_INVALID_ARG_TYPE.
파일
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
- test/password_contract.mjs
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9