Created
September 6, 2022 21:47
-
-
Save gschueler/3264609ee5bcd3eadf9c6316b348d6b0 to your computer and use it in GitHub Desktop.
List PBE providers for Jasypt with BouncyCastle and groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab('org.jasypt:jasypt:1.9.3') | |
import org.jasypt.registry.AlgorithmRegistry | |
@Grab('org.bouncycastle:bcprov-jdk15on:1.70') | |
import org.bouncycastle.jce.provider.BouncyCastleProvider | |
import java.security.Security | |
Security.addProvider(new BouncyCastleProvider()); | |
Set digestAlgos = AlgorithmRegistry.getAllDigestAlgorithms(); | |
Set pbeAlgos = AlgorithmRegistry.getAllPBEAlgorithms(); | |
System.out.println(); | |
System.out.println("DIGEST ALGORITHMS: \n* " + digestAlgos.join("\n* ")); | |
System.out.println(); | |
System.out.println("PBE ALGORITHMS: \n* " + pbeAlgos.join("\n* ")); | |
System.out.println(); | |
//based on: https://github.com/jasypt/jasypt/blob/master/jasypt/src/main/java/org/jasypt/intf/cli/AlgorithmRegistryCLI.java |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment