Skip to content

Add support for RSA decryption and optimize testing setup#49

Merged
chamodanethra merged 2 commits intomainfrom
feature/rsa-decrypt-functionality
Nov 28, 2025
Merged

Add support for RSA decryption and optimize testing setup#49
chamodanethra merged 2 commits intomainfrom
feature/rsa-decrypt-functionality

Conversation

@chamodanethra
Copy link
Owner

Description

This pull request introduces several significant updates:

  1. RSA Decryption Support:

    • Adds a decrypt method for RSA payload decryption utilizing hardware-backed private keys.
    • Introduces parameters such as enableDecryption in AndroidConfig and implements respective native decryption logic for both Android and iOS platforms.
    • Provides new classes (DecryptionOptions and DecryptResult) to support the decryption API.
    • Updates the example application with a decryption demonstration.
    • Includes unit tests to ensure the correctness of the decryption implementation.
  2. Testing Setup Optimization:

    • Removes default widget test templates from example applications (banking_app, document_signer, example, passwordless_login).
    • Optimizes import statements across the project.
    • Enables the flutter test command in the main.yml workflow for improved automated testing.

Checklist

  • I have performed a self-review of my own code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests that verify my fix or feature.
  • New and existing unit tests pass locally with my changes.
  • I have made corresponding changes to the documentation.

Additional Context

This pull request enhances both functionality and maintainability, ensuring secure payload handling and improving the overall testing infrastructure across the

Introduces a `decrypt` method to support RSA payload decryption using the hardware-backed private key.

- Adds an `enableDecryption` parameter to `AndroidConfig` for generating keys with decryption capabilities.
- Implements the native decryption logic for both Android (using `BiometricPrompt` with a `Cipher`) and iOS (using `SecKeyCreateDecryptedData`).
- Introduces `DecryptionOptions` and `DecryptResult` classes for the new API.
- Updates the example app to include a decryption demonstration.
- Adds unit tests for the new decryption functionality.
Removes the default widget test files from all example applications (`banking_app`, `document_signer`, `example`, `passwordless_login`).

This commit also optimizes imports. Additionally, it enables the `flutter test` command in the `main.yml` workflow.
@chamodanethra chamodanethra merged commit 1d0d4b8 into main Nov 28, 2025
1 check passed
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.

1 participant