com.yosokumo.core
Class DigestRequest

java.lang.Object
  extended by com.yosokumo.core.DigestRequest

 class DigestRequest
extends java.lang.Object

Provides a method to digest (using HMAC) and encode (using Base64) an input message.


Field Summary
(package private) static int ENCODED_LEN
          Length of the encoded digest.
 
Constructor Summary
DigestRequest()
           
 
Method Summary
static java.lang.String makeDigest(java.lang.String message, byte[] key)
          Make an encoded digest of a message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENCODED_LEN

static final int ENCODED_LEN
Length of the encoded digest.

See Also:
Constant Field Values
Constructor Detail

DigestRequest

DigestRequest()
Method Detail

makeDigest

public static java.lang.String makeDigest(java.lang.String message,
                                          byte[] key)
                                   throws ServiceException
Make an encoded digest of a message.

Parameters:
message - the input message to encode.
key - the key to use to digest the input message. It must be exactly 64 bytes in length.
Returns:
the digested, encoded key. It is exactly 88 characters long.
Throws:
ServiceException - if the input key length is not correct.
ServiceException - if there is any problem encoding the message.