Jasypt: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 31: Line 31:
==Encryption==
==Encryption==
===Jasypt===
===Jasypt===
<source lang="bash" highlight="5,6">
<source lang="bash" highlight="4-6">
wget https://repo1.maven.org/maven2/org/jasypt/jasypt/1.9.3/jasypt-1.9.3.jar
wget https://repo1.maven.org/maven2/org/jasypt/jasypt/1.9.3/jasypt-1.9.3.jar
java -cp jasypt-1.9.3.jar org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI \
java -cp jasypt-1.9.3.jar org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI \
Line 40: Line 40:
</source>
</source>


<source lang="bash" highlight="5,6">
<source lang="bash" highlight="4-6">
wget https://repo1.maven.org/maven2/org/jasypt/jasypt/1.9.3/jasypt-1.9.3.jar
wget https://repo1.maven.org/maven2/org/jasypt/jasypt/1.9.3/jasypt-1.9.3.jar
java -cp jasypt-1.9.3.jar org.jasypt.intf.cli.JasyptPBEStringDecryptionCLI \
java -cp jasypt-1.9.3.jar org.jasypt.intf.cli.JasyptPBEStringDecryptionCLI \
Line 49: Line 49:
</source>
</source>
----
----
<source lang="bash" highlight="5,6">
<source lang="bash" highlight="4-6">
wget https://repo1.maven.org/maven2/org/jasypt/jasypt/1.9.3/jasypt-1.9.3.jar
wget https://repo1.maven.org/maven2/org/jasypt/jasypt/1.9.3/jasypt-1.9.3.jar
java -cp jasypt-1.9.3.jar org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI \
java -cp jasypt-1.9.3.jar org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI \
Line 58: Line 58:
</source>
</source>


<source lang="bash" highlight="5,6">
<source lang="bash" highlight="4-6">
wget https://repo1.maven.org/maven2/org/jasypt/jasypt/1.9.3/jasypt-1.9.3.jar
wget https://repo1.maven.org/maven2/org/jasypt/jasypt/1.9.3/jasypt-1.9.3.jar
java -cp jasypt-1.9.3.jar org.jasypt.intf.cli.JasyptPBEStringDecryptionCLI \
java -cp jasypt-1.9.3.jar org.jasypt.intf.cli.JasyptPBEStringDecryptionCLI \

Revision as of 08:05, 1 March 2021

Jasypt is a java library which allows the developer to add basic encryption capabilities to his/her projects with minimum effort, and without the need of having deep knowledge on how cryptography works.

  • High-security, standards-based encryption techniques, both for unidirectional and bidirectional encryption. Encrypt passwords, texts, numbers, binaries...
  • Transparent integration with Hibernate.
  • Suitable for integration into Spring-based applications and also transparently integrable with Spring Security.
  • Integrated capabilities for encrypting the configuration of applications (i.e. datasources).
  • Specific features for high-performance encryption in multi-processor/multi-core systems.
  • Open API for use with any JCE provider.

Dependencies

<dependency>
    <groupId>org.jasypt</groupId>
    <artifactId>jasypt</artifactId>
    <version>1.9.3</version>
</dependency>
<dependency>
    <groupId>com.github.ulisesbocchio</groupId>
    <artifactId>jasypt-spring-boot</artifactId>
    <version>3.0.3</version>
</dependency>

Encryption

Jasypt

wget https://repo1.maven.org/maven2/org/jasypt/jasypt/1.9.3/jasypt-1.9.3.jar
java -cp jasypt-1.9.3.jar org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI \
ivGeneratorClassName=org.jasypt.iv.RandomIvGenerator \
algorithm=PBEWITHHMACSHA512ANDAES_256 \
password=secret_password \
input=sadaqah!
wget https://repo1.maven.org/maven2/org/jasypt/jasypt/1.9.3/jasypt-1.9.3.jar
java -cp jasypt-1.9.3.jar org.jasypt.intf.cli.JasyptPBEStringDecryptionCLI \
ivGeneratorClassName=org.jasypt.iv.RandomIvGenerator \
algorithm=PBEWITHHMACSHA512ANDAES_256 \
password=secret_password \
input=D5pJ1JQ+v+I+AYS7BARBnOcKQudi2r1g4qgobdOjT8dogcldMvRPPLAVQx3zddS/

wget https://repo1.maven.org/maven2/org/jasypt/jasypt/1.9.3/jasypt-1.9.3.jar
java -cp jasypt-1.9.3.jar org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI \
ivGeneratorClassName=org.jasypt.iv.RandomIvGenerator \
algorithm=PBEWITHHMACSHA1ANDAES_128 \
password=secret_password \
input=sadaqah!
wget https://repo1.maven.org/maven2/org/jasypt/jasypt/1.9.3/jasypt-1.9.3.jar
java -cp jasypt-1.9.3.jar org.jasypt.intf.cli.JasyptPBEStringDecryptionCLI \
ivGeneratorClassName=org.jasypt.iv.RandomIvGenerator \
algorithm=PBEWITHHMACSHA1ANDAES_128 \
password=secret_password \
input=lC6Z9mpaX8iIS9/SEKIQzuEMbxd58pBWBksuARklDHXyspf3Hg1AqyyMWEd9StMa

Apache Camel Jasypt

wget https://cdn.chorke.org/soft/comn/apache/camel/apache-camel-2.15.6.tar.gz;\
tar -xzvf apache-camel-2.15.6.tar.gz; cd apache-camel-2.15.6/lib/;\
java -jar camel-jasypt-2.15.6.jar \
-c encrypt -p secret_password \
-i sadaqah!
wget https://cdn.chorke.org/soft/comn/apache/camel/apache-camel-2.15.6.tar.gz;\
tar -xzvf apache-camel-2.15.6.tar.gz; cd apache-camel-2.15.6/lib/;\
java -jar camel-jasypt-2.15.6.jar \
-c decrypt -p secret_password \
-i BVT6gDNautctO6xPvKrHgU3EAlsbDbnU

wget https://cdn.chorke.org/soft/comn/apache/camel/apache-camel-2.15.6.tar.gz;\
tar -xzvf apache-camel-2.15.6.tar.gz; cd apache-camel-2.15.6/lib/;\
java -jar camel-jasypt-2.15.6.jar \
-c encrypt -a PBEWithMD5AndDES \
-p secret_password \
-i sadaqah!
wget https://cdn.chorke.org/soft/comn/apache/camel/apache-camel-2.15.6.tar.gz;\
tar -xzvf apache-camel-2.15.6.tar.gz; cd apache-camel-2.15.6/lib/;\
java -jar camel-jasypt-2.15.6.jar \
-c decrypt -a PBEWithMD5AndDES \
-p secret_password \
-i YCYR4yln0xh8E5a1XA+GR+ZtLiLsAx41

References