Skip to content

Conversation

@terrier989
Copy link
Member

@terrier989 terrier989 commented Nov 21, 2025

Empty HMAC key can be useful in some situations like HKDF. See #176 .

Copilot AI review requested due to automatic review settings November 21, 2025 16:00
Copilot finished reviewing on behalf of terrier989 November 21, 2025 16:02
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 removes the validation that prevented empty HMAC keys in the Dart implementation to support use cases like HKDF, where empty keys (or salts) are valid according to RFC 5869.

Key Changes

  • Removed the ArgumentError validation that enforced non-empty secret keys in _DartHmacSink.initializeSync()
  • Allows HMAC to be used with empty keys for algorithms like HKDF that may require this functionality

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

@terrier989 terrier989 merged commit a0ee041 into master Nov 21, 2025
21 checks passed
@terrier989 terrier989 deleted the fix/empty_hmac_key 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