Oracle Security Developer Tools PKI SDK CMP Java API Reference
10g Release 2 (10.1.2.0.2)

B15559-01


oracle.security.crypto.cmp
Class Challenge

java.lang.Object
  extended byoracle.security.crypto.cmp.Challenge


public class Challenge
extends java.lang.Object

A proof-of-possession challenge for an individual private key.

See Also:
POPChallenge

Constructor Summary
Challenge()
Create a new, empty Challenge.
Challenge(AlgorithmIdentifier digestAlg, java.math.BigInteger randomInt, oracle.security.crypto.cert.GeneralName sender, PublicKey pubKey)
Create a new Challenge instance using the given digest algorithm, challenge random integer and sender's name, and encrypts the challenge using the given public key.
Challenge(java.io.InputStream is)

Method Summary
AlgorithmIdentifier getDigestAlgID()
java.math.BigInteger getRandomInt(PrivateKey privKey)
oracle.security.crypto.cert.GeneralName getSender(PrivateKey privKey)
byte[] getWitness()
void input(java.io.InputStream is)
int length()
void output(java.io.OutputStream os)
java.lang.String toString()

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Challenge

public Challenge()
Create a new, empty Challenge.

Challenge

public Challenge(AlgorithmIdentifier digestAlg,
                 java.math.BigInteger randomInt,
                 oracle.security.crypto.cert.GeneralName sender,
                 PublicKey pubKey)
          throws AlgorithmIdentifierException,
                 InvalidKeyException,
                 CipherException
Create a new Challenge instance using the given digest algorithm, challenge random integer and sender's name, and encrypts the challenge using the given public key.
Parameters:
digestAlg - The digest algorithm used to produce the witness digest bytes.
randomInt - The random integer that will be encrypted to form the challenge (with the sender's name).
sender - The sender's name that will be encrypted to form the challenge (with the random integer).
pubKey - The public key of the recipient, which will be used to encrypt the challenge.

Challenge

public Challenge(java.io.InputStream is)
          throws java.io.IOException

Method Detail

getDigestAlgID

public AlgorithmIdentifier getDigestAlgID()

getWitness

public byte[] getWitness()

getRandomInt

public java.math.BigInteger getRandomInt(PrivateKey privKey)
                                  throws CipherException
Throws:
CipherException

getSender

public oracle.security.crypto.cert.GeneralName getSender(PrivateKey privKey)
                                                  throws CipherException
Throws:
CipherException

toString

public java.lang.String toString()

input

public void input(java.io.InputStream is)
           throws java.io.IOException
Throws:
java.io.IOException

output

public void output(java.io.OutputStream os)
            throws java.io.IOException
Throws:
java.io.IOException

length

public int length()

Oracle Security Developer Tools PKI SDK CMP Java API Reference
10g Release 2 (10.1.2.0.2)

B15559-01


Copyright © 2005 , Oracle. All rights reserved.