Cumulus4j API
(1.0.0)

org.cumulus4j.crypto
Interface MACCalculatorFactory

All Known Implementing Classes:
AbstractMACCalculatorFactory, MACCalculatorFactoryImpl, MACCalculatorFactoryImpl.DES, MACCalculatorFactoryImpl.DES64, MACCalculatorFactoryImpl.DES9797Alg3, MACCalculatorFactoryImpl.DES9797Alg3with7816d4, MACCalculatorFactoryImpl.DESCFB8, MACCalculatorFactoryImpl.GOST28147, MACCalculatorFactoryImpl.MD2, MACCalculatorFactoryImpl.MD4, MACCalculatorFactoryImpl.MD5, MACCalculatorFactoryImpl.OldSHA384, MACCalculatorFactoryImpl.OldSHA512, MACCalculatorFactoryImpl.RC2, MACCalculatorFactoryImpl.RC2CFB8, MACCalculatorFactoryImpl.RIPEMD128, MACCalculatorFactoryImpl.RIPEMD160, MACCalculatorFactoryImpl.SHA1, MACCalculatorFactoryImpl.SHA224, MACCalculatorFactoryImpl.SHA256, MACCalculatorFactoryImpl.SHA384, MACCalculatorFactoryImpl.SHA512, MACCalculatorFactoryImpl.Tiger

public interface MACCalculatorFactory

Factory creating instances of MACCalculator.

Implementations of this interface are used by CryptoRegistry.createMACCalculator(String, boolean) to provide instances of MACCalculator.

Note: Implementors should subclass AbstractMACCalculatorFactory instead of directly implementing this interface.

Author:
Marco หงุ่ยตระกูล-Schulze - marco at nightlabs dot de

Method Summary
 MACCalculator createMACCalculator(boolean initWithDefaults)
           Create a new instance of MACCalculator and optionally initialise it.
 String getAlgorithmName()
          Get the name of the MAC algorithm implemented by the MACCalculator created by this factory.
 void setAlgorithmName(String algorithmName)
          Set the name of the MAC algorithm.
 

Method Detail

createMACCalculator

MACCalculator createMACCalculator(boolean initWithDefaults)

Create a new instance of MACCalculator and optionally initialise it.

Parameters:
initWithDefaults - whether to initialise the MACCalculator with default values so that it can be used immediately as-is.
Returns:
a new instance of MACCalculator (iff initWithDefaults==true ready-to-use; otherwise requiring initialisation before it can be used).

getAlgorithmName

String getAlgorithmName()
Get the name of the MAC algorithm implemented by the MACCalculator created by this factory. See Supported algorithms for a list of supported algorithms.

Returns:
the name of the MAC algorithm.

setAlgorithmName

void setAlgorithmName(String algorithmName)
Set the name of the MAC algorithm. This method is called once and should throw an IllegalStateException if it is called again.

Parameters:
algorithmName - the name of the MAC algorithm; never null.
See Also:
getAlgorithmName()

Cumulus4j API
(1.0.0)

Copyright © 2012 NightLabs Consulting GmbH. All Rights Reserved.