com.ibm.atp.auth
Class Challenge

java.lang.Object
  |
  +--com.ibm.atp.auth.ByteSequence
        |
        +--com.ibm.atp.auth.Challenge
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public final class Challenge
extends ByteSequence

The Challenge class is random byte sequence which is a challenge for authentication.

Version:
1.00 $Date: 2001/07/28 06:33:42 $
Author:
ONO Kouichi
See Also:
Serialized Form

Field Summary
static int LENGTH
          The length of byte sequence.
 
Constructor Summary
Challenge()
          Constructor creates a secure random generator, and generate byte sequence as a challenge for authentication.
Challenge(Challenge challenge)
          Constructor creates byte sequence as a copy of given byte sequence as a challenge for authentication.
Challenge(java.lang.String str)
          Constructor creates byte sequence as a copy of given hexadecimal string of encoded bytes as a challenge for authentication.
 
Method Summary
 byte[] challenge()
          Returns current byte sequence as a challenge for authentication.
 java.lang.String toString()
          Returns a hexadecimal string representation of the byte sequence.
 
Methods inherited from class com.ibm.atp.auth.ByteSequence
append, append, append, append, clone, copy, copy, copy, equals, equals, equals, length, sequence
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LENGTH

public static final int LENGTH
The length of byte sequence.
Constructor Detail

Challenge

public Challenge()
Constructor creates a secure random generator, and generate byte sequence as a challenge for authentication.

Challenge

public Challenge(Challenge challenge)
Constructor creates byte sequence as a copy of given byte sequence as a challenge for authentication.
Parameters:
challenge - a byte sequence to be copied as a challenge

Challenge

public Challenge(java.lang.String str)
Constructor creates byte sequence as a copy of given hexadecimal string of encoded bytes as a challenge for authentication.
Parameters:
str - a string of encoded byte sequence to be copied as a challenge
Method Detail

challenge

public final byte[] challenge()
Returns current byte sequence as a challenge for authentication.
Returns:
current byte sequence as a challenge for authentication.

toString

public java.lang.String toString()
Returns a hexadecimal string representation of the byte sequence. The series of hexadecimal strings are the contents of byte sequence.
Overrides:
toString in class ByteSequence
Returns:
a hexadecimal string representation of the byte sequence
See Also:
ByteSequence.toString()