Provides preconfigured Jasypt encryptors.
The library is available from Maven Central using the following Maven dependency:
<dependency>
<groupId>org.cthing</groupId>
<artifactId>cthing-jasypt</artifactId>
<version>1.0.0</version>
</dependency>or the following Gradle dependency:
implementation("org.cthing:cthing-jasypt:1.0.0")The CthingStringEncryptor provides a preconfigured Jasypt encryptor that can be used to encrypt and descrypt strings. An instance of the encryptor can be reused.
CthingStringEncryptor encryptor = new CthingStringEncryptor();
encryptor.setPassword("abcdef");
String encrypted = encryptor.encrypt("Hello World!");The library is compiled for Java 17. If a Java 17 toolchain is not available, one will be downloaded.
Gradle is used to build the library:
./gradlew buildThe Javadoc for the library can be generated by running:
./gradlew javadocThis project is released on the Maven Central repository. Perform the following steps to create a release.
- Commit all changes for the release
- In the
build.gradle.ktsfile, edit theProjectVersionobject- Set the version for the release. The project follows semantic versioning.
- Set the build type to
BuildType.release
- Commit the changes
- Wait until CI builds the release candidate
- Run the command
mkrelease cthing-jasypt <version> - In a browser go to the Maven Central Repository
- Log in
- Select
Publishfrom the menubar - Press
Publish Component - Enter a name for the deployment
- Choose the file
cthing-jasypt-bundle-<version>.zip - Press
Publish Component - Refresh the page until the deployment has been validated
- Press
Publish - Refresh the page until the status is
Published - Log out
- Delete the file
cthing-jasypt-bundle-<version>.zip - In a browser, go to the project on GitHub
- Generate a release with the tag
<version> - In the build.gradle.kts file, edit the
ProjectVersionobject- Increment the version patch number
- Set the build type to
BuildType.snapshot
- Update the
CHANGELOG.mdwith the changes in the release and prepare for next release changes - Update the
Usagesection in theREADME.mdwith the latest artifact release version - Commit these changes
