Skip to content

fix(aes-cbc): normalize invalid IV errors - #408

Open
harrshita123 wants to merge 1 commit into
google:masterfrom
harrshita123:fix/aes-cbc-iv-error-parity
Open

harrshita123 wants to merge 1 commit into
google:masterfrom
harrshita123:fix/aes-cbc-iv-error-parity

Conversation

@harrshita123

Copy link
Copy Markdown
Contributor

Summary

Normalizes native AES-CBC invalid-IV failures to OperationError, matching browser Web Crypto behavior.

Adds regression coverage for 15-byte and 17-byte IVs across AES-CBC byte and stream encryption/decryption APIs.

Fixes #407.

Validation

  • dart analyze --fatal-warnings .
  • dart test test/webcrypto_test.dart --reporter expanded
  • dart test test/webcrypto_test.dart -p chrome --reporter expanded
  • dart test test/webcrypto_test.dart -p chrome --compiler dart2wasm --concurrency=1 --reporter compact
  • git diff --check

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: native AES-CBC reports invalid IV lengths as ArgumentError instead of OperationError

1 participant