Questions tagged [jasypt]

Jasypt is a Java-based encryption library, designed for ease of use with minimum necessary knowledge of how cryptography works.

Jasypt (Java simplified encryption) 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.
  • ... and much more

Official Website: http://jasypt.org/

Useful Links:

333 questions
6
votes
4 answers

jasypt in cmd: cannot find main class

I am using jasypt 1.9.2 in Windows 7 x64 cmd. Here's encrypt.bat content: ECHO ON set SCRIPT_NAME=encrypt.bat set EXECUTABLE_CLASS=org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI set EXEC_CLASSPATH=. if "%JASYPT_CLASSPATH%" == "" goto…
WesternGun
  • 7,222
  • 56
  • 97
6
votes
3 answers

Cannot encrypt password in configuration file

I'm having trouble encrypting the database password in hibernate.cfg.xml This is my property file. com.microsoft.sqlserver.jdbc.SQLServerDriver
nachokk
  • 14,055
  • 4
  • 22
  • 47
5
votes
2 answers

Encryption function returns different output every time

I have following code - import org.jasypt.util.text.BasicTextEncryptor; public static void main(String[] args) { BasicTextEncryptor textEncryptor = new BasicTextEncryptor(); textEncryptor.setPassword("kshitiz"); String cipherText =…
Kshitiz Sharma
  • 15,851
  • 23
  • 83
  • 148
5
votes
4 answers

Receiving NullPointerException while using Jasypt and Spring Security 3.1

I am trying to configure Jasypt with Spring Security. My configuration file looks like this: jdbc.driver=com.mysql.jdbc.Driver jdbc.url=jdbc:mysql://localhost:8090/sample jdbc.username=ENC(*****) where the *****=the salted username …
user2660762
  • 51
  • 1
  • 5
4
votes
1 answer

Store encryption keys in Java code?

I am using JASYPT for encryption decryption of passwords in our Java based software. This is how, we encrypt the password: StrongTextEncryptor textEncryptor = new StrongTextEncryptor(); …
DG.
  • 503
  • 3
  • 12
  • 20
4
votes
1 answer

When using Jaspyt to encrypt Spring properties files, is an environment variable really a secure place to store the master password?

I'm using Jaspyt and Spring 3 in my Java project. I currently store the database connection properties in a properties file. The user name and password are plain text, so I've been looking at using Jaspyt's…
user935265
  • 244
  • 1
  • 2
  • 8
4
votes
2 answers

@SpringBootTest not using test properties

I am using jasypt for encrypting application.properties in a Spring Boot application. My goal is to update my integration tests so that jasypt is used with test encryptor password. My problem is that my test is not overriding the test properties.…
Tudor Grigoriu
  • 607
  • 1
  • 7
  • 24
4
votes
1 answer

Jasypt encryption stops working after upgrade to JDK 7u261

We recently upgraded to JDK 7u261 from JDK 7u251 as the new release was available to Java SE support customers on April 15, 2020. The Jasypt encryption stopped working after this Java version upgrade. I receive the following error…
user57358
  • 137
  • 1
  • 2
  • 12
4
votes
3 answers

Unable to decrypt error using jasypt with spring boot

I am using spring boot:2.2.2.RELEASE when i tried to add jasypt functionality to hide my password i got the following error Unable to decrypt: ENC(MyEncryptedPass). Decryption of Properties failed, make sure encryption/decryption passwords match i…
AHM200
  • 97
  • 2
  • 11
4
votes
0 answers

Jasypt and .war deployment issue: jasypt.encryptor.password missing

I am trying to deploy my SpringBoot .war to tomcat but it fails due to: Failed to bind properties under 'spring.mail.password' to java.lang.String: Reason: Required Encryption configuration property missing: jasypt.encryptor.password Where do I…
4
votes
0 answers

org.xml.sax.SAXParseException JASypt conflict when upgrading Spring beyond 4.2.1 using Java

I am trying to upgrade my spring version from "4.1.5.RELEASE" to "5.0.3.RELEASE" (the latest). When I go to any version beyond "4.2.1.RELEASE", I am getting the following error: Caused by:…
Garet Jax
  • 831
  • 1
  • 11
  • 22
4
votes
1 answer

Why is the following annotation legal in Java but not in groovy?

I wanted to add encryption to my application using the Jasypt library. Their integration page says to add a @TypeDef annotation: "Define the encryption type with a @TypeDef annotation, which could be either inside the persisted entity class or…
Mike R
  • 3,948
  • 3
  • 28
  • 40
4
votes
1 answer

how can my password contain special characters using jasypt and encrypt.sh?

Trying to use the encrypt.sh utility and my password has special characters: ./encrypt.sh input="$%#!" password="your_jasypt_password" algorithm="PBEWITHSHA256AND128BITAES-CBC-BC" keyObtentionIterations=1000 providerName="BC" -bash: !": event not…
user2395365
  • 1,426
  • 3
  • 14
  • 26
4
votes
2 answers

In .NET, how can I decrypt values that were encrypted using PBEWithMD5AndDES in Java?

We're migrating data from a legacy Java app into our newer .NET app. The Java app has a MySQL backend, and the .NET app has a SQL Server back end. We have the full source code and config files for both, but none of the developers who worked on the…
Joshua Carmody
  • 12,581
  • 15
  • 63
  • 81
4
votes
1 answer

Why set a password using Jasypt when encrypting text?

To encrypt a password I use (modified from http://www.jasypt.org/encrypting-texts.html): BasicTextEncryptor textEncryptor = new BasicTextEncryptor(); textEncryptor.setPassword(myEncryptionPassword); String myEncryptedText =…
blue-sky
  • 45,835
  • 124
  • 360
  • 647
1
2
3
22 23