For the latest news and information visit
The GNU Crypto project

gnu.crypto.hash
Class HashFactory

java.lang.Object
  extended bygnu.crypto.hash.HashFactory

public class HashFactory
extends java.lang.Object

A Factory to instantiate message digest algorithm instances.

Version:
$Revision: 1.2 $

Method Summary
static IMessageDigest getInstance(java.lang.String name)
          Return an instance of a hash algorithm given its name.
static java.util.Set getNames()
          Returns a Set of names of hash 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 IMessageDigest getInstance(java.lang.String name)

Return an instance of a hash algorithm given its name.

Parameters:
name - the name of the hash algorithm.
Returns:
an instance of the hash algorithm, or null if none found.
Throws:
java.lang.InternalError - if the implementation does not pass its self- test.

getNames

public static final java.util.Set getNames()

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

Returns:
a Set of hash names (Strings).

For the latest news and information visit
The GNU Crypto project

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