gnu.crypto.mac

Class HMacFactory

public class HMacFactory extends Object implements Registry

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

Version: $Revision: 1.5 $

Method Summary
static IMacgetInstance(String name)

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

static SetgetNames()

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

Method Detail

getInstance

public static IMac getInstance(String name)

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

Parameters: name the fully qualified name of the underlying algorithm: composed as the concatenation of a literal prefix (see 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 Set getNames()

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

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

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