- java.lang.Object
-
- io.github.mmm.crypto.algorithm.AbstractSecurityAlgorithm
-
- All Implemented Interfaces:
CryptoAlgorithm
- Direct Known Subclasses:
AbstractCryptoAlgorithmWithProvider
,CryptorImplCombined
,HashCreatorImplCombined
,SignatureProcessorFactoryImplEcBc
,SignatureProcessorImpl
,SignatureProcessorImplWithHash
public abstract class AbstractSecurityAlgorithm extends Object implements CryptoAlgorithm
The abstract base implementation ofCryptoAlgorithm
.- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
-
Constructor Summary
Constructors Constructor Description AbstractSecurityAlgorithm()
The constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RuntimeException
creationFailedException(Exception cause, Class<?> objectType)
static RuntimeException
creationFailedException(Exception cause, Class<?> objectType, String variant)
protected RuntimeException
creationFailedException(Exception cause, String objectType)
static RuntimeException
creationFailedException(Exception cause, String objectType, String variant)
protected static String
getAlgorithm(CryptoAlgorithm[] algorithms)
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.github.mmm.crypto.algorithm.CryptoAlgorithm
getAlgorithm
-
-
-
-
Method Detail
-
getAlgorithm
protected static String getAlgorithm(CryptoAlgorithm[] algorithms)
- Parameters:
algorithms
- the combined algorithms.- Returns:
- the combined algorithm
String
. - See Also:
CryptoAlgorithm.getAlgorithm()
-
creationFailedException
protected RuntimeException creationFailedException(Exception cause, Class<?> objectType)
- Parameters:
cause
- thecause
of the error.objectType
- the type of the object that could not be created.- Returns:
- the wrapped
RuntimeException
.
-
creationFailedException
protected RuntimeException creationFailedException(Exception cause, String objectType)
- Parameters:
cause
- thecause
of the error.objectType
- the type of the object that could not be created.- Returns:
- the wrapped
RuntimeException
.
-
creationFailedException
public static RuntimeException creationFailedException(Exception cause, Class<?> objectType, String variant)
- Parameters:
cause
- thecause
of the error.objectType
- the type of the object that could not be created.variant
- thealgorithm
or type.- Returns:
- the wrapped
RuntimeException
.
-
creationFailedException
public static RuntimeException creationFailedException(Exception cause, String objectType, String variant)
- Parameters:
cause
- thecause
of the error.objectType
- the type of the object that could not be created.variant
- thealgorithm
or type.- Returns:
- the wrapped
RuntimeException
.
-
-