Skip to content
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

Add RSA and AES encryption/decryption capabilities to crypto stdlib #13422

Merged
merged 44 commits into from
Feb 12, 2019
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
4607ba1
Add AES and RSA encryption functions
ayomawdb Jan 29, 2019
d283769
Merge remote-tracking branch 'upstream/master' into crypto-encrypt
ayomawdb Jan 29, 2019
6e83bd1
Add RSA encryption with OAEP
ayomawdb Jan 30, 2019
348c643
Clean unnecessary constants
ayomawdb Jan 30, 2019
0b5f456
Add RSA and AES to crypto example
ayomawdb Jan 31, 2019
dec1b4a
Add RSA and AES to crypto example
ayomawdb Jan 31, 2019
4a5aaf3
Correct since version numbers
ayomawdb Jan 31, 2019
34cdf91
Add docs to utility class
ayomawdb Jan 31, 2019
8ff995e
Refactor encryption util
ayomawdb Jan 31, 2019
b956cca
Improve unit tests
ayomawdb Jan 31, 2019
50ab97b
Update examples/crypto/crypto.bal
Feb 11, 2019
e638376
Update examples/crypto/crypto.bal
Feb 11, 2019
0b6658d
Update examples/crypto/crypto.bal
Feb 11, 2019
0ad72e9
Update examples/crypto/crypto.bal
Feb 11, 2019
7d0e575
Update examples/crypto/crypto.bal
Feb 11, 2019
840e21d
Update examples/crypto/crypto.bal
Feb 11, 2019
3f7d5cf
Update stdlib/crypto/src/main/ballerina/crypto/Module.md
Feb 11, 2019
bd9d972
Update stdlib/crypto/src/main/ballerina/crypto/Module.md
Feb 11, 2019
277e164
Update stdlib/crypto/src/main/ballerina/crypto/Module.md
Feb 11, 2019
f24427b
Update stdlib/crypto/src/main/ballerina/crypto/Module.md
Feb 11, 2019
70ff4a8
Update examples/crypto/crypto.bal
Feb 11, 2019
f56b198
Update examples/crypto/crypto.bal
Feb 11, 2019
552333e
Update examples/crypto/crypto.bal
Feb 11, 2019
7554a93
Update stdlib/crypto/src/main/ballerina/crypto/Module.md
Feb 11, 2019
741ed57
Update stdlib/crypto/src/main/ballerina/crypto/Module.md
Feb 11, 2019
31de7b0
Update examples/crypto/crypto.bal
Feb 11, 2019
f103f29
Update stdlib/crypto/src/main/ballerina/crypto/Module.md
Feb 11, 2019
16de66e
Update stdlib/crypto/src/main/ballerina/crypto/Module.md
Feb 11, 2019
ebd9249
Update stdlib/crypto/src/main/ballerina/crypto/Module.md
Feb 11, 2019
a87fcfd
Update stdlib/crypto/src/main/ballerina/crypto/Module.md
Feb 11, 2019
9d1d8e9
Update stdlib/crypto/src/main/ballerina/crypto/Module.md
Feb 11, 2019
9723def
Update stdlib/crypto/src/main/ballerina/crypto/Module.md
Feb 11, 2019
6dfe57d
Reorder imports
ayomawdb Feb 11, 2019
cd4308d
Update stdlib/crypto/src/test/resources/test-src/crypto/crypto-test.bal
NatashaWso2 Feb 12, 2019
5f138ae
Update stdlib/crypto/src/test/resources/test-src/crypto/crypto-test.bal
NatashaWso2 Feb 12, 2019
fbaaa09
Update stdlib/crypto/src/test/resources/test-src/crypto/crypto-test.bal
NatashaWso2 Feb 12, 2019
452667e
Update stdlib/crypto/src/test/resources/test-src/crypto/crypto-test.bal
NatashaWso2 Feb 12, 2019
9ebfbf9
Update stdlib/crypto/src/test/resources/test-src/crypto/crypto-test.bal
NatashaWso2 Feb 12, 2019
ab86350
Update stdlib/crypto/src/test/resources/test-src/crypto/crypto-test.bal
NatashaWso2 Feb 12, 2019
3517c7a
Update stdlib/crypto/src/test/resources/test-src/crypto/crypto-test.bal
NatashaWso2 Feb 12, 2019
e4fbd8e
Update stdlib/crypto/src/test/resources/test-src/crypto/crypto-test.bal
NatashaWso2 Feb 12, 2019
6eb8efa
Update stdlib/crypto/src/test/resources/test-src/crypto/crypto-test.bal
NatashaWso2 Feb 12, 2019
1dd167a
Update stdlib/crypto/src/test/resources/test-src/crypto/crypto-test.bal
NatashaWso2 Feb 12, 2019
ada50ff
Update stdlib/crypto/src/main/ballerina/crypto/Module.md
NatashaWso2 Feb 12, 2019
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
Prev Previous commit
Next Next commit
Add RSA and AES to crypto example
ayomawdb committed Jan 31, 2019
commit dec1b4a67e7780663f55b11626bc6a32a2cdecff
Original file line number Diff line number Diff line change
@@ -20,10 +20,13 @@

import org.ballerinalang.bre.Context;
import org.ballerinalang.bre.bvm.BlockingNativeCallableUnit;
import org.ballerinalang.model.types.TypeKind;
import org.ballerinalang.model.values.BMap;
import org.ballerinalang.model.values.BValue;
import org.ballerinalang.model.values.BValueArray;
import org.ballerinalang.natives.annotations.Argument;
import org.ballerinalang.natives.annotations.BallerinaFunction;
import org.ballerinalang.natives.annotations.ReturnType;
import org.ballerinalang.stdlib.crypto.Constants;
import org.ballerinalang.stdlib.crypto.CryptoUtils;

@@ -35,7 +38,20 @@
*
* @since 0.991.0
*/
@BallerinaFunction(orgName = "ballerina", packageName = "crypto", functionName = "signRsaMd5", isPublic = true)
@BallerinaFunction(
orgName = "ballerina", packageName = "crypto",
functionName = "signRsaMd5",
args = {
@Argument(name = "input", type = TypeKind.ARRAY, elementType = TypeKind.BYTE),
@Argument(name = "privateKey", type = TypeKind.RECORD, structType = "PrivateKey",
structPackage = "ballerina/crypto")
},
returnType = {
@ReturnType(type = TypeKind.ARRAY, elementType = TypeKind.BYTE),
@ReturnType(type = TypeKind.RECORD, structType = Constants.CRYPTO_ERROR,
structPackage = Constants.CRYPTO_PACKAGE)
},
isPublic = true)
public class SignRsaMd5 extends BlockingNativeCallableUnit {

@Override