Apache CXF API

org.apache.cxf.rs.security.oauth2.utils
Class MessageDigestGenerator

java.lang.Object
  extended by org.apache.cxf.rs.security.oauth2.utils.MessageDigestGenerator

public class MessageDigestGenerator
extends Object

The utility Message Digest generator which can be used for generating random values


Field Summary
static String ALGO_MD5
           
static String ALGO_SHA_1
           
static String ALGO_SHA_256
           
 
Constructor Summary
MessageDigestGenerator()
           
 
Method Summary
 byte[] createDigest(byte[] input, String algo)
           
 byte[] createDigest(String input, String algo)
           
 String generate(byte[] input)
           
 void setAlgorithm(String algo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALGO_SHA_1

public static final String ALGO_SHA_1
See Also:
Constant Field Values

ALGO_SHA_256

public static final String ALGO_SHA_256
See Also:
Constant Field Values

ALGO_MD5

public static final String ALGO_MD5
See Also:
Constant Field Values
Constructor Detail

MessageDigestGenerator

public MessageDigestGenerator()
Method Detail

generate

public String generate(byte[] input)
                throws OAuthServiceException
Throws:
OAuthServiceException

createDigest

public byte[] createDigest(String input,
                           String algo)

createDigest

public byte[] createDigest(byte[] input,
                           String algo)
                    throws NoSuchAlgorithmException
Throws:
NoSuchAlgorithmException

setAlgorithm

public void setAlgorithm(String algo)

Apache CXF API

Apache CXF