-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Update 11 Feature] Add support for PGP encryption/decryption with streams #567
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #567 +/- ##
============================================
- Coverage 89.11% 84.06% -5.06%
- Complexity 172 205 +33
============================================
Files 23 27 +4
Lines 873 1161 +288
Branches 124 167 +43
============================================
+ Hits 778 976 +198
- Misses 71 142 +71
- Partials 24 43 +19 ☔ View full report in Codecov by Sentry. |
native/src/main/java/io/ballerina/stdlib/crypto/nativeimpl/Decrypt.java
Outdated
Show resolved
Hide resolved
native/src/main/java/io/ballerina/stdlib/crypto/nativeimpl/Decrypt.java
Outdated
Show resolved
Hide resolved
Co-authored-by: DimuthuMadushan <[email protected]>
native/src/main/java/io/ballerina/stdlib/crypto/nativeimpl/Decrypt.java
Outdated
Show resolved
Hide resolved
native/src/main/java/io/ballerina/stdlib/crypto/nativeimpl/Encrypt.java
Outdated
Show resolved
Hide resolved
@TharmiganK we may need to update the spec and the changelog along with the new changes |
# Conflicts: # ballerina/Ballerina.toml # ballerina/Dependencies.toml # ballerina/encrypt_decrypt.bal
Co-authored-by: Bhashinee <[email protected]>
Quality Gate passedIssues Measures |
Closing this PR since this requires Java 21 changes to the master. The feature will be available in the |
# Conflicts: # gradle.properties
c484727
to
6e35d66
Compare
Quality Gate passedIssues Measures |
Purpose
Fixes: ballerina-platform/ballerina-library#7064
Part of: ballerina-platform/ballerina-library#7252
With this PR, two new functionalities are added to the crypto module:
encryptStreamAsPgp
: Read the content from a stream, encrypt with PGP and return a encrypted streamdecryptStreamFromPgp
: Read the content from an PGP encrypted stream, decrypt with PGP and return a decrypted streamWith this new APIs, large files can be encrypted/decrypted with PGP by loading them as streams rather than loading the entire content into the memory.
Find the following results with large files(the files are generated with random ASCII characters):
Examples
Checklist