Class SecureRandomFactory
java.lang.Object
de.xima.fc.cryptography.SecureRandomFactory
Factory for creating instances of
SecureRandom. This class attempts to use a preferred algorithm to maximize
security and performance.
The factory prioritizes a list of preferred algorithms and falls back to the default algorithm if none of the preferred ones are available. The preferred algorithm is determined during class initialization.
- Since:
- 09.04.25
-
Method Summary
-
Method Details
-
getInstance
Returns an instance ofSecureRandom. If a preferred algorithm is available, it will be used; otherwise, the default algorithm will be returned.- Returns:
- A
SecureRandominstance. - Throws:
IllegalStateException- If the preferred algorithm is unexpectedly unavailable.
-