com.dyuproject.openid
Class SessionType

java.lang.Object
  extended by com.dyuproject.openid.SessionType

public final class SessionType
extends Object

The session type of a DiffieHellmanAssociation.

Author:
David Yu
Date created:
Sep 11, 2008

Field Summary
static SessionType HMAC_SHA1
          "DH-SHA1"
static SessionType HMAC_SHA256
          "DH-SHA256"
 
Method Summary
 String getAlgorithm()
          Gets the algorithm.
 String getAssociationType()
          Gets the association type.
static SessionType getDefault()
          Gets the default session type HMAC_SHA1.
 String getDigestType()
          Gets the digest type.
 String getSessionType()
          Gets the session type as string.
 byte[] getSignature(byte[] secretKey, byte[] toSign)
          Returns the byte array signed by this session type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HMAC_SHA1

public static final SessionType HMAC_SHA1
"DH-SHA1"


HMAC_SHA256

public static final SessionType HMAC_SHA256
"DH-SHA256"

Method Detail

getDefault

public static SessionType getDefault()
Gets the default session type HMAC_SHA1.


getSessionType

public String getSessionType()
Gets the session type as string. (E.g "DH-SHA1")


getAssociationType

public String getAssociationType()
Gets the association type. (E.g "HMAC-SHA1")


getDigestType

public String getDigestType()
Gets the digest type. (E.g "SHA-1")


getAlgorithm

public String getAlgorithm()
Gets the algorithm. (E.g "HMACSHA1")


getSignature

public byte[] getSignature(byte[] secretKey,
                           byte[] toSign)
                    throws NoSuchAlgorithmException,
                           InvalidKeyException
Returns the byte array signed by this session type.

Throws:
NoSuchAlgorithmException
InvalidKeyException


Copyright © 2008-2013. All Rights Reserved.