Tsukuyomi OpenID
0.2.0

jp.sourceforge.tsukuyomi.openid.association
クラス Association

java.lang.Object
  上位を拡張 jp.sourceforge.tsukuyomi.openid.association.Association
すべての実装されたインタフェース:
Serializable

public class Association
extends Object
implements Serializable

作成者:
Marius Scurtescu, Johnny Bufu
関連項目:
直列化された形式

フィールドの概要
static String FAILED_ASSOC_HANDLE
           
static String HMAC_SHA1_ALGORITHM
           
static int HMAC_SHA1_KEYSIZE
           
static String HMAC_SHA256_ALGORITHM
           
static int HMAC_SHA256_KEYSIZE
           
static String TYPE_HMAC_SHA1
           
static String TYPE_HMAC_SHA256
           
 
メソッドの概要
static Association createHmacSha1(String handle, byte[] macKeyBytes, Date expDate)
           
static Association createHmacSha1(String handle, byte[] macKeyBytes, int expiryIn)
           
static Association createHmacSha256(String handle, byte[] macKeyBytes, Date expDate)
           
static Association createHmacSha256(String handle, byte[] macKeyBytes, int expiryIn)
           
protected static SecretKey createMacKey(String algorithm, byte[] macKey)
           
static Association generate(String type, String handle, int expiryIn)
           
static Association generateHmacSha1(String handle, int expiryIn)
           
static Association generateHmacSha256(String handle, int expiryIn)
           
protected static SecretKey generateMacKey(String algorithm, int keySize)
           
protected static SecretKey generateMacSha1Key()
           
protected static SecretKey generateMacSha256Key()
           
 Date getExpiry()
           
static Association getFailedAssociation(int expiryIn)
           
 String getHandle()
           
 SecretKey getMacKey()
           
 String getType()
           
 boolean hasExpired()
           
static boolean isHmacSha1Supported()
           
static boolean isHmacSha256Supported()
           
static boolean isHmacSupported(String hMacType)
           
protected  byte[] sign(byte[] data)
           
 String sign(String text)
           
 boolean verifySignature(String text, String signature)
           
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

FAILED_ASSOC_HANDLE

public static final String FAILED_ASSOC_HANDLE
関連項目:
定数フィールド値

TYPE_HMAC_SHA1

public static final String TYPE_HMAC_SHA1
関連項目:
定数フィールド値

TYPE_HMAC_SHA256

public static final String TYPE_HMAC_SHA256
関連項目:
定数フィールド値

HMAC_SHA1_ALGORITHM

public static final String HMAC_SHA1_ALGORITHM
関連項目:
定数フィールド値

HMAC_SHA256_ALGORITHM

public static final String HMAC_SHA256_ALGORITHM
関連項目:
定数フィールド値

HMAC_SHA1_KEYSIZE

public static final int HMAC_SHA1_KEYSIZE
関連項目:
定数フィールド値

HMAC_SHA256_KEYSIZE

public static final int HMAC_SHA256_KEYSIZE
関連項目:
定数フィールド値
メソッドの詳細

getFailedAssociation

public static Association getFailedAssociation(int expiryIn)

generate

public static Association generate(String type,
                                   String handle,
                                   int expiryIn)
                            throws AssociationException
例外:
AssociationException

generateHmacSha1

public static Association generateHmacSha1(String handle,
                                           int expiryIn)

createHmacSha1

public static Association createHmacSha1(String handle,
                                         byte[] macKeyBytes,
                                         int expiryIn)

createHmacSha1

public static Association createHmacSha1(String handle,
                                         byte[] macKeyBytes,
                                         Date expDate)

generateHmacSha256

public static Association generateHmacSha256(String handle,
                                             int expiryIn)

createHmacSha256

public static Association createHmacSha256(String handle,
                                           byte[] macKeyBytes,
                                           int expiryIn)

createHmacSha256

public static Association createHmacSha256(String handle,
                                           byte[] macKeyBytes,
                                           Date expDate)

generateMacKey

protected static SecretKey generateMacKey(String algorithm,
                                          int keySize)

generateMacSha1Key

protected static SecretKey generateMacSha1Key()

generateMacSha256Key

protected static SecretKey generateMacSha256Key()

isHmacSupported

public static boolean isHmacSupported(String hMacType)

isHmacSha256Supported

public static boolean isHmacSha256Supported()

isHmacSha1Supported

public static boolean isHmacSha1Supported()

createMacKey

protected static SecretKey createMacKey(String algorithm,
                                        byte[] macKey)

getType

public String getType()

getHandle

public String getHandle()

getMacKey

public SecretKey getMacKey()

getExpiry

public Date getExpiry()

hasExpired

public boolean hasExpired()

sign

protected byte[] sign(byte[] data)
               throws AssociationException
例外:
AssociationException

sign

public String sign(String text)
            throws AssociationException
例外:
AssociationException

verifySignature

public boolean verifySignature(String text,
                               String signature)
                        throws AssociationException
例外:
AssociationException

Tsukuyomi OpenID
0.2.0

Copyright © 2008 Project Tsukuyomi. All Rights Reserved.