For the latest news and information visit
The GNU Crypto project

gnu.crypto.mac
Class HMacFactory

java.lang.Object
  |
  +--gnu.crypto.mac.HMacFactory
All Implemented Interfaces:
Registry

public class HMacFactory
extends java.lang.Object
implements Registry

A Factory to instantiate Keyed-Hash Message Authentication Code (HMAC) algorithm instances.

Version:
$Revision: 1.2 $

Fields inherited from interface gnu.crypto.Registry
AES_CIPHER, ANUBIS_CIPHER, CTR_MODE, DSA_KPG, DSA_SIG, DSS_KPG, DSS_SIG, ECB_MODE, GNU_CRYPTO, HMAC_NAME_PREFIX, ICM_MODE, ICM_PRNG, KHAZAD_CIPHER, MD_PRNG, MD4_HASH, MD5_HASH, NULL_CIPHER, OFB_MODE, PKCS7_PAD, RIJNDAEL_CIPHER, RIPEMD_128_HASH, RIPEMD_160_HASH, RIPEMD128_HASH, RIPEMD160_HASH, RSA_KPG, RSA_PSS_SIG, SERPENT_CIPHER, SHA_1_HASH, SHA_HASH, SHA1_HASH, SHA160_HASH, SQUARE_CIPHER, TBC_PAD, TMMH16, TWOFISH_CIPHER, UHASH32, UMAC_PRNG, UMAC32, WHIRLPOOL_HASH
 
Method Summary
static IMac getInstance(java.lang.String name)
          Return an instance of a HMAC algorithm given the name of its underlying hash function, prefixed with the literal defined in Registry.HMAC_NAME_PREFIX.
static java.util.Set getNames()
          Returns a Set of names of HMAC algorithms supported by this Factory.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static IMac getInstance(java.lang.String name)

Return an instance of a HMAC algorithm given the name of its underlying hash function, prefixed with the literal defined in Registry.HMAC_NAME_PREFIX.

Parameters:
name - the fully qualified name of the underlying algorithm: composed as the concatenation of a literal prefix (see Registry.HMAC_NAME_PREFIX) and the name of the underlying hash algorithm.
Returns:
an instance of the HMAC algorithm, or null if none can be constructed.
Throws:
InternalError - if the implementation does not pass its self-test.

getNames

public static final java.util.Set getNames()

Returns a Set of names of HMAC algorithms supported by this Factory.

Returns:
a Set of HMAC algorithm names (Strings).

For the latest news and information visit
The GNU Crypto project

Copyright ©2001-2002 Free Software Foundation, Inc.. All Rights Reserved.