Skip to content

Conversation

@terrier989
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings November 21, 2025 19:45
Copilot finished reviewing on behalf of terrier989 November 21, 2025 19:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR performs a comprehensive refactoring of the cryptography package and its test utilities, focusing on code organization, API improvements, and type safety enhancements.

Key changes:

  • Renamed test library file from cryptography_test.dart to cryptography_testing.dart to better reflect its purpose
  • Simplified test code structure by removing unnecessary nesting and using lambda expressions
  • Improved browser implementation type safety by replacing ByteBuffer with Uint8List throughout
  • Removed empty key validation in HMAC to allow empty keys
  • Added utility methods to Ed25519 for key/signature length validation
  • Reorganized class members in Blake2b/Blake2s for better readability
  • Made X25519 keyPairType non-virtual in the base class

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
cryptography_test/test/main_test.dart Updated import to use renamed test library file
cryptography_test/lib/cryptography_testing.dart New test library file (renamed from cryptography_test.dart)
cryptography_test/lib/algorithms/x25519.dart Simplified test structure by removing unnecessary group wrapper and using lambda expressions
cryptography_test/lib/algorithms/hmac.dart Updated test to reflect that empty keys are now allowed
cryptography/lib/src/dart/x25519.dart Removed redundant keyPairType override now that base class has @nonvirtual annotation
cryptography/lib/src/cryptography/mac_algorithm.dart Removed empty key validation and improved error message for unsupported AAD
cryptography/lib/src/cryptography/algorithms.dart Reorganized Blake2b/Blake2s class members, added Ed25519 validation helpers, made X25519 keyPairType @nonvirtual
cryptography/lib/src/browser/rsa_ssa_pkcs1v15.dart Improved type safety by using Uint8List directly instead of ByteBuffer
cryptography/lib/src/browser/rsa_pss.dart Improved type safety by using Uint8List directly instead of ByteBuffer
cryptography/lib/src/browser/pbkdf2.dart Improved type safety by using Uint8List directly instead of ByteBuffer
cryptography/lib/src/browser/hmac.dart Improved type safety by using Uint8List directly instead of ByteBuffer
cryptography/lib/src/browser/hkdf.dart Improved type safety and reordered imports for consistency
cryptography/lib/src/browser/ecdsa.dart Improved type safety by using Uint8List directly instead of ByteBuffer
cryptography/lib/src/browser/ecdh.dart Improved type safety and renamed extension type to be more descriptive
cryptography/lib/src/browser/browser_secret_key.dart Improved type safety by using Uint8List directly instead of ByteBuffer
cryptography/lib/src/browser/_javascript_bindings.dart Updated return types to Uint8List and added new extension types for better type safety
.github/workflows/dart.yml Added cryptography_test package to the test matrix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@terrier989 terrier989 merged commit 936f1a9 into master Nov 21, 2025
12 checks passed
@terrier989 terrier989 deleted the fix/ci branch November 21, 2025 23:12
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.

2 participants