Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoSuchAlgorithmException: SHA1PRNG SecureRandom not available #384

Open
ping-hsiu-chiang opened this issue Feb 19, 2024 · 1 comment
Open

Comments

@ping-hsiu-chiang
Copy link

An exception occurred in the runtime environment.
Caused by: java.security.NoSuchAlgorithmException: SHA1PRNG SecureRandom not available
I'm not sure if it's caused by FIPS being enabled.

@tsunejui
Copy link

An exception occurred in the runtime environment. Caused by: java.security.NoSuchAlgorithmException: SHA1PRNG SecureRandom not available I'm not sure if it's caused by FIPS being enabled.

The same issue occurs in my application after enabling FIPS mode. It seems that the RandomSaltGenerator class defaults to using SHA1PRNG, and might not be supported in FIPS mode anymore.

https://github.com/tfredrich/jasypt/blob/master/jasypt/src/main/java/org/jasypt/salt/RandomSaltGenerator.java#L52

    /**
     * The default algorithm to be used for secure random number 
     * generation: set to SHA1PRNG.
     */
    public static final String DEFAULT_SECURE_RANDOM_ALGORITHM = "SHA1PRNG";
    
    private final SecureRandom random;
    
    
    /**
     * Creates a new instance of <tt>RandomSaltGenerator</tt> using the 
     * default secure random number generation algorithm.
     */
    public RandomSaltGenerator() {
        this(DEFAULT_SECURE_RANDOM_ALGORITHM);
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants