public final class HashAlgorithmRegistry
extends java.lang.Object
Please, make sure you register your algorithm with {
registerHashAlgorithm(String, HashAlgorithm)
before referring to it
by name
Modifier and Type | Method and Description |
---|---|
static HashAlgorithm |
lookupHashAlgorithm(java.lang.String name)
Tries to find selected hash algorithm using name provided.
|
static void |
registerHashAlgorithm(java.lang.String name,
HashAlgorithm alg)
Registers provided
HashAlgorithm instance with the given name. |
public static void registerHashAlgorithm(java.lang.String name, HashAlgorithm alg)
HashAlgorithm
instance with the given name. Name
is not case sensitive. Any registered algorithm with the same name will be
substitutedname
- name of the algorithmalg
- algorithm instance to registerpublic static HashAlgorithm lookupHashAlgorithm(java.lang.String name)
Note, that lookup is being performed using name's lower-case value
name
- the algorithm name to be used for lookupHashAlgorithm
instance or null
if there's no
algorithm with the specified nameCopyright © 2006-2009 Dustin Sallings, 2009-2013 Couchbase, Inc.