net.handle.hdllib
Class ChallengeResponse

java.lang.Object
  extended by net.handle.hdllib.AbstractMessage
      extended by net.handle.hdllib.AbstractResponse
          extended by net.handle.hdllib.ChallengeResponse

public class ChallengeResponse
extends AbstractResponse

Object used to represent a challenge sent to a user asking for proof of their identity. The challenge includes a nonce (a random unpredictable set of bytes) as well as a digest of the request that is being challenged (so that the user can verify that they are only authorizing a specific operation).


Field Summary
 byte[] nonce
           
 
Fields inherited from class net.handle.hdllib.AbstractResponse
stream, streaming
 
Fields inherited from class net.handle.hdllib.AbstractMessage
authoritative, cacheCertify, certify, continuous, encodedMessage, encrypt, expiration, ignoreRestrictedValues, keepAlive, majorProtocolVersion, messageBody, minorProtocolVersion, OC_ADD_VALUE, OC_BACKUP_SERVER, OC_CREATE_HANDLE, OC_DELETE_HANDLE, OC_DUMP_HANDLES, OC_GET_NEXT_TXN_ID, OC_GET_SITE_INFO, OC_HOME_NA, OC_LIST_HANDLES, OC_LIST_HOMED_NAS, OC_MODIFY_VALUE, OC_REMOVE_VALUE, OC_RESERVED, OC_RESOLUTION, OC_RESPONSE_TO_CHALLENGE, OC_RETRIEVE_TXN_LOG, OC_SESSION_EXCHANGEKEY, OC_SESSION_SETUP, OC_SESSION_TERMINATE, OC_UNHOME_NA, OC_VERIFY_CHALLENGE, opCode, RC_AUTHEN_ERROR, RC_AUTHEN_TIMEOUT, RC_AUTHENTICATION_FAILED, RC_AUTHENTICATION_NEEDED, RC_ERROR, RC_HANDLE_ALREADY_EXISTS, RC_HANDLE_NOT_FOUND, RC_INSUFFICIENT_PERMISSIONS, RC_INVALID_ADMIN, RC_INVALID_CREDENTIAL, RC_INVALID_HANDLE, RC_INVALID_SESSION_KEY, RC_INVALID_SESSIONSETUP_REQUEST, RC_NEED_RSAKEY_FOR_SESSIONEXCHANGE, RC_OPERATION_NOT_SUPPORTED, RC_OUT_OF_DATE_SITE_INFO, RC_PROTOCOL_ERROR, RC_RECURSION_COUNT_TOO_HIGH, RC_RESERVED, RC_SERVER_BACKUP, RC_SERVER_NOT_RESP, RC_SERVER_TOO_BUSY, RC_SERVICE_REFERRAL, RC_SESSION_FAILED, RC_SESSION_TIMEOUT, RC_SUCCESS, RC_VALUE_ALREADY_EXISTS, RC_VALUES_NOT_FOUND, rdHashType, recursionCount, recursive, requestDigest, requestId, responseCode, returnRequestDigest, sessionId, signature, signerHdl, signerHdlIdx, siteInfoSerial
 
Constructor Summary
ChallengeResponse(AbstractRequest req)
          Construct a challenge to the specified request.
ChallengeResponse(int opCode, byte[] nonce)
          Construct a challenge to the specified request.
 
Method Summary
static void initializeRandom()
           
static void initializeRandom(byte[] seed)
           
 
Methods inherited from class net.handle.hdllib.AbstractResponse
getContinuedResponse, streamResponse
 
Methods inherited from class net.handle.hdllib.AbstractMessage
clearBuffers, decryptMessage, encryptMessage, getEncodedMessage, getEncodedMessageBody, getResponseCodeMessage, hasEqualOrGreaterVersion, signMessage, signMessage, signMessage, takeValuesFrom, toString, verifyMessage, verifyMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

nonce

public byte[] nonce
Constructor Detail

ChallengeResponse

public ChallengeResponse(int opCode,
                         byte[] nonce)
Construct a challenge to the specified request. This constructor is used on the client side, when decoding messages.


ChallengeResponse

public ChallengeResponse(AbstractRequest req)
                  throws HandleException
Construct a challenge to the specified request. This constructor is used on the server side.

Throws:
HandleException
Method Detail

initializeRandom

public static final void initializeRandom()

initializeRandom

public static final void initializeRandom(byte[] seed)