Class CryptoInfoService
java.lang.Object
com.eurodyn.qlack.fuse.crypto.service.CryptoInfoService
A provider of information regarding the security algorithms and services
available in the runtime.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns all available security algorithms available in the runtime.Returns the security providers available in the runtime.getSecurityServices
(String providerName) Returns the security services provided by a specific provider available in the runtime.getSecurityServicesForAlgorithmType
(String algorithmType) Returns the security services providing a specific security algorithm.boolean
Checks if unlimited strength cryptography is available.prettyPrint
(List<SecurityServiceDTO> services) Pretty prints a list of services.
-
Constructor Details
-
CryptoInfoService
public CryptoInfoService()
-
-
Method Details
-
getSecurityProviders
Returns the security providers available in the runtime.- Returns:
- a list containing the found providers
-
getSecurityServices
Returns the security services provided by a specific provider available in the runtime.- Parameters:
providerName
- the provider to inquiry for available services- Returns:
- a list containing the found services
-
getSecurityServicesForAlgorithmType
Returns the security services providing a specific security algorithm.- Parameters:
algorithmType
- the algorithm type to find services providing it- Returns:
- a list containing the found services
-
getAlgorithmTypes
Returns all available security algorithms available in the runtime.- Returns:
- a list containing the found algorithms
-
prettyPrint
Pretty prints a list of services.- Parameters:
services
- the list of services to pretty print- Returns:
- the generated string
-
isUnlimitedStrengthActive
Checks if unlimited strength cryptography is available. The check is taking place by comparing the maximum size available of an AES key. If this method returns false, you can enable unlimited strength cryptography by downloading https://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html (or in JDK > 8 by setting Security.setProperty("crypto.policy", "unlimited")).- Returns:
- true if capacity is enough, false if it is not
- Throws:
NoSuchAlgorithmException
- thrown when no algorithm is found for encryption
-