|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.Adaptee
org.norther.tammi.core.base.DefaultObjectFactory<MessageDigest>
org.norther.tammi.core.security.DefaultMessageDigestFactory
public class DefaultMessageDigestFactory
A default implementation of MessageDigestFactory.
| Field Summary |
|---|
| Fields inherited from class org.norther.tammi.core.base.Adaptee |
|---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
| Constructor Summary | |
|---|---|
DefaultMessageDigestFactory()
Constructs a new factory. |
|
| Method Summary | |
|---|---|
String |
decodeBase64(String string)
Decodes a BASE64 string applying the UTF-8 encoding. |
String |
decodeBase64(String string,
String encoding)
Decodes a BASE64 string applying the specified encoding. |
String |
digest(String algorithm,
String string)
Computes a hash for the given string by applying platform's default encoding. |
String |
digest(String algorithm,
String string,
String encoding)
Computes a hash for the given string applying the specified encoding. |
String |
digest(String algorithm,
String salt,
String string,
String encoding)
Computes a hash for the given string using the given salt and applying the specified encoding. |
String |
encodeBase64(String string)
Encodes a BASE64 string applying the UTF-8 encoding. |
String |
encodeBase64(String string,
String encoding)
Encodes a BASE64 string applying the specified encoding. |
String |
generate(String algorithm)
Generates a secret key and returns its string representation. |
MessageDigest |
getInstance(String className,
ObjectName loader,
Object[] params,
String[] signature)
Gets an instance of a named class using a specified class loader. |
boolean |
isLoaderSupported(String className)
Checks if specified class loaders are supported for a named class. |
| Methods inherited from class org.norther.tammi.core.base.DefaultObjectFactory |
|---|
getInstance, getInstance, getInstance |
| Methods inherited from class org.norther.tammi.core.base.Adaptee |
|---|
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, postmanaged, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unmanaged, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.norther.tammi.core.base.ObjectFactory |
|---|
getInstance, getInstance, getInstance |
| Constructor Detail |
|---|
public DefaultMessageDigestFactory()
| Method Detail |
|---|
public String digest(String algorithm,
String string)
throws NoSuchAlgorithmException
MessageDigestFactory
digest in interface MessageDigestFactoryalgorithm - the digest algorithm.string - the string to use.
NoSuchAlgorithmException - if the algorithm is unknown.
public String digest(String algorithm,
String string,
String encoding)
throws NoSuchAlgorithmException
MessageDigestFactory
digest in interface MessageDigestFactoryalgorithm - the digest algorithm.string - the string to use.encoding - the character encoding.
NoSuchAlgorithmException - if the algorithm is unknown.
public String digest(String algorithm,
String salt,
String string,
String encoding)
throws NoSuchAlgorithmException
MessageDigestFactory
digest in interface MessageDigestFactoryalgorithm - the digest algorithm.salt - the salt to use.string - the string to use.encoding - the character encoding.
NoSuchAlgorithmException - if the algorithm is unknown.
public String generate(String algorithm)
throws NoSuchAlgorithmException
MessageDigestFactory
generate in interface MessageDigestFactoryalgorithm - the secret algorithm.
NoSuchAlgorithmException - if the algorithm is unknown.public String encodeBase64(String string)
MessageDigestFactory
encodeBase64 in interface MessageDigestFactorystring - the string to encode.
public String encodeBase64(String string,
String encoding)
MessageDigestFactory
encodeBase64 in interface MessageDigestFactorystring - the string to encode.encoding - the character encoding.
public String decodeBase64(String string)
MessageDigestFactory
decodeBase64 in interface MessageDigestFactorystring - the string to decode.
public String decodeBase64(String string,
String encoding)
MessageDigestFactory
decodeBase64 in interface MessageDigestFactorystring - the string to decode.encoding - the character encoding.
public MessageDigest getInstance(String className,
ObjectName loader,
Object[] params,
String[] signature)
throws ConstructionException
ObjectFactoryClass loaders are supported only if the isLoaderSupported method returns true. Otherwise the loader parameter is ignored.
getInstance in interface ObjectFactory<MessageDigest>getInstance in class DefaultObjectFactory<MessageDigest>className - the name of the class.loader - the class loader.params - an array containing the parameters of the constructor.signature - an array containing the signature of the constructor.
ConstructionException - if construction fails.public boolean isLoaderSupported(String className)
ObjectFactory
isLoaderSupported in interface ObjectFactory<MessageDigest>isLoaderSupported in class DefaultObjectFactory<MessageDigest>className - the name of the class.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||