Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daggerok/java-rsa-pem-pkcs8-pk8-public-private-keys
https://github.com/daggerok/java-rsa-pem-pkcs8-pk8-public-private-keys
copy-dependencies github-action github-action-cache github-action-java github-action-maven github-actions github-actions-cache github-actions-java github-actions-maven maven-dependency-plugin pem rsa
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/daggerok/java-rsa-pem-pkcs8-pk8-public-private-keys
- Owner: daggerok
- Created: 2020-02-20T13:44:24.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-29T21:01:04.000Z (over 4 years ago)
- Last Synced: 2024-01-29T23:14:33.650Z (10 months ago)
- Topics: copy-dependencies, github-action, github-action-cache, github-action-java, github-action-maven, github-actions, github-actions-cache, github-actions-java, github-actions-maven, maven-dependency-plugin, pem, rsa
- Language: Java
- Size: 91.8 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# java certificates and public / private keys [![CI](https://github.com/daggerok/java-rsa-pem-pkcs8-pk8-public-private-keys/workflows/CI/badge.svg)](https://github.com/daggerok/java-rsa-pem-pkcs8-pk8-public-private-keys/actions)
## rsa-asymmetric-cryptography
TODO...
```bash
./mvnw -f rsa-asymmetric-cryptography clean package dependency:copy-dependencies -DincludeScope=runtime
java -cp "rsa-asymmetric-cryptography/target/dependency/*:rsa-asymmetric-cryptography/target/classes" daggerok.Mainjava -cp "rsa-asymmetric-cryptography/target/dependency/*:rsa-asymmetric-cryptography/target/classes" daggerok.Main generate and write
java -cp "rsa-asymmetric-cryptography/target/dependency/*:rsa-asymmetric-cryptography/target/classes" daggerok.Main readexport encrypted=`java -cp "rsa-asymmetric-cryptography/target/dependency/*:rsa-asymmetric-cryptography/target/classes" daggerok.Main encrypt --payload="Hello, World"`
echo "encrypted value is $encrypted"export decrypted=`java -cp "rsa-asymmetric-cryptography/target/dependency/*:rsa-asymmetric-cryptography/target/classes" daggerok.Main decrypt --payload="$encrypted"`
echo "decrypted value is $decrypted"
```* [link 1](https://stackoverflow.com/questions/8310539/how-to-copy-dependencies-jars-without-test-jars-to-a-directory-using-maven/61456534#61456534)
* [link 2](https://mkyong.com/java/java-asymmetric-cryptography-example/)## consume-keys-files
```bash
./mvnw clean compile -f consume-keys-filesopenssl genrsa -out consume-keys-files/target/private_rsa_key.pem 4096
openssl rsa -pubout -in consume-keys-files/target/private_rsa_key.pem -out consume-keys-files/target/public_key.pem
openssl pkcs8 -topk8 -in consume-keys-files/target/private_rsa_key.pem -inform pem -out consume-keys-files/target/private_key.pem -outform pem -nocryptjava -cp consume-keys-files/target/classes consumekeysfiles.Main --public=consume-keys-files/target/public_key.pem --private=./consume-keys-files/target/private_key.pem
```[TODO: Write app to generate keys (files?) from java for later use](https://www.devglan.com/java8/rsa-encryption-decryption-java)
## aes-encryption
```bash
./mvnw clean compile -f aes-encryptionjava -cp aes-encryption/target/classes aesencryption.Main --encrypt=ololo
java -cp aes-encryption/target/classes aesencryption.Main --decrypt=9T3d2eg/O8ntHYO1UXdDZg==
```[AES in java](https://www.devglan.com/corejava/java-aes-encypt-decrypt)
## rsa-key-pair-generation
```bash
./mvnw clean compile -f rsa-key-pair-generationjava -cp `pwd`/rsa-key-pair-generation/target/classes rsakeypairgeneration.Main --keySize=1024
```[RSA Encryption in Javascript and Decryption in Java](https://www.devglan.com/spring-mvc/rsa-encryption-in-javascript-and-decryption-in-java)