Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/storage/enginepb/key_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (e EncryptionType) JWKAlgorithm() (string, error) {
case EncryptionType_AES_192_CTR_V2:
return "cockroach-aes-192-ctr-v2", nil
case EncryptionType_AES_256_CTR_V2:
return "cockroach-aes-192-ctr-v2", nil
return "cockroach-aes-256-ctr-v2", nil
Comment on lines 24 to +25
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

The JWKAlgorithm function lacks test coverage. Consider adding tests that verify all encryption types return the correct algorithm strings, especially to prevent similar copy-paste errors in the future. A simple table-driven test that checks both JWKAlgorithm and EncryptionTypeFromJWKAlgorithm for all encryption types would help catch issues like this bug.

Copilot uses AI. Check for mistakes.
}
return "", fmt.Errorf("unknown EncryptionType %d", e)
}
Expand Down
Loading