feat(encryption): Added support for AEAD encryption algorithms#6
feat(encryption): Added support for AEAD encryption algorithms#6GT-610 merged 2 commits intolollipopkit:masterfrom
Conversation
Added the `processAll` extension method to `AEADCipher`, and selected either AEAD or standard block cipher algorithms based on the encryption type when decrypting SSH key pairs
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthrough此变更在私钥解密路径中区分 AEAD 与非 AEAD 密码:当 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@lib/src/ssh_key_pair.dart`:
- Around line 242-249: The file lib/src/ssh_key_pair.dart failed CI due to
formatting; run dart format on this file (or the whole project) to fix style
issues: format the method containing the cipher.isAead branch (the block that
uses cipher.createAEADCipher, cipher.createCipher, decryptCipher.processAll) so
the file passes `dart format --set-exit-if-changed .`, then re-add the formatted
file to your commit.
- Around line 243-249: The decrypt branch currently returns processAll(blob)
directly for both AEAD and non-AEAD paths (using cipher.isAead ->
cipher.createAEADCipher/createCipher), which lets AEAD failures throw raw
lower-level exceptions and bypass the later checkInt logic; wrap the decryption
call in a try/catch for both branches, catch any thrown exception from
decryptCipher.processAll(blob) and rethrow a SSHKeyDecryptError containing the
original error (preserve message/stack), then return the decrypted bytes so
subsequent checkInt runs against uniform SSHKeyDecryptError semantics.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7d6c05f1-ec5d-427b-b9cb-b8409e8aae38
📒 Files selected for processing (2)
lib/src/ssh_key_pair.dartlib/src/utils/cipher_ext.dart
…de formatting Added error handling to the SSH key decryption process; a clear exception is now thrown when decryption fails. Additionally, code formatting was adjusted to improve readability, including line breaks and indentation.
Resolve lollipopkit/flutter_server_box/issues/1091.
Added the
processAllextension method toAEADCipher, and selected either AEAD or standard block cipher algorithms based on the encryption type when decrypting SSH key pairsSummary by CodeRabbit
发布说明
新功能
改进