com.dyuproject.openid
Class DiffieHellmanAssociation

java.lang.Object
  extended by com.dyuproject.openid.DiffieHellmanAssociation
All Implemented Interfaces:
Association

public class DiffieHellmanAssociation
extends Object
implements Association

Association using DiffieHellman session

Author:
David Yu

Field Summary
 
Fields inherited from interface com.dyuproject.openid.Association
ASSOC_HMAC_SHA1, ASSOC_HMAC_SHA256, SESSION_DH_SHA1, SESSION_DH_SHA256, SESSION_NO_ENCRYPTION
 
Constructor Summary
DiffieHellmanAssociation()
           
DiffieHellmanAssociation(SessionType type)
           
 
Method Summary
 boolean associate(OpenIdUser user, OpenIdContext context)
           
 SessionType getSessionAssociationType()
           
static void parseInputByLineSeparator(BufferedReader br, char keyValueSeparator, Map<String,Object> parseMap)
           
 void setSessionAssociationType(SessionType type)
           
 boolean verifyAuth(OpenIdUser user, Map<String,String> authRedirect, OpenIdContext context)
           
static byte[] xor(BigInteger sharedSecretKey, byte[] encMacKey, String digestType)
           
static byte[] xor(byte[] sharedSecret, byte[] encMacKey)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiffieHellmanAssociation

public DiffieHellmanAssociation()

DiffieHellmanAssociation

public DiffieHellmanAssociation(SessionType type)
Method Detail

setSessionAssociationType

public void setSessionAssociationType(SessionType type)

getSessionAssociationType

public SessionType getSessionAssociationType()

associate

public boolean associate(OpenIdUser user,
                         OpenIdContext context)
                  throws Exception
Specified by:
associate in interface Association
Throws:
Exception

verifyAuth

public boolean verifyAuth(OpenIdUser user,
                          Map<String,String> authRedirect,
                          OpenIdContext context)
                   throws Exception
Specified by:
verifyAuth in interface Association
Throws:
Exception

xor

public static byte[] xor(BigInteger sharedSecretKey,
                         byte[] encMacKey,
                         String digestType)
                  throws Exception
Throws:
Exception

xor

public static byte[] xor(byte[] sharedSecret,
                         byte[] encMacKey)
                  throws Exception
Throws:
Exception

parseInputByLineSeparator

public static void parseInputByLineSeparator(BufferedReader br,
                                             char keyValueSeparator,
                                             Map<String,Object> parseMap)
                                      throws IOException
Throws:
IOException


Copyright © 2013. All Rights Reserved.