Package io.fusionauth.security
Class DefaultCryptoProvider
java.lang.Object
io.fusionauth.security.DefaultCryptoProvider
- All Implemented Interfaces:
CryptoProvider
The default Crypto Provider for FusionAuth JWT. This will utilize the default security provider to get
instances of MAC or signature algorithms.
- Author:
- Daniel DeGroff
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetMacInstance(String name) Return an instance of a Mac digest for the provided algorithm name.getSignatureInstance(String name) Return an instance of a Signature digest for the provided algorithm name.
-
Constructor Details
-
DefaultCryptoProvider
public DefaultCryptoProvider()
-
-
Method Details
-
getMacInstance
Description copied from interface:CryptoProviderReturn an instance of a Mac digest for the provided algorithm name.- Specified by:
getMacInstancein interfaceCryptoProvider- Parameters:
name- the name of the algorithm.- Returns:
- a Mac instance
- Throws:
NoSuchAlgorithmException- thrown when the requested algorithm cannot be satisfied by this crypto provider.
-
getSignatureInstance
Description copied from interface:CryptoProviderReturn an instance of a Signature digest for the provided algorithm name.- Specified by:
getSignatureInstancein interfaceCryptoProvider- Parameters:
name- the name of the algorithm.- Returns:
- a Signature instance
- Throws:
NoSuchAlgorithmException- thrown when the requested algorithm cannot be satisfied by this crypto provider.
-