Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools PKI SDK CMP Java API Reference 10g Release 3 (10.1.3) B25373-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.security.crypto.cmp
Class Challenge

`java.lang.Object
oracle.security.crypto.cmp.Challenge`

All Implemented Interfaces:
  oracle.security.crypto.asn1.ASN1Object, oracle.security.crypto.util.Streamable

public class Challenge
extends java.lang.Object
implements oracle.security.crypto.asn1.ASN1Object

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

See Also:
  `POPChallenge`

Constructor Summary
`Challenge()` Create a new, empty `Challenge`.
`Challenge(oracle.security.crypto.core.AlgorithmIdentifier digestAlg, java.math.BigInteger randomInt, oracle.security.crypto.cert.GeneralName sender, oracle.security.crypto.core.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(byte[] witness, java.math.BigInteger randomInt, oracle.security.crypto.cert.GeneralName sender, oracle.security.crypto.core.PublicKey pubKey)` Create a new `Challenge` instance using the given witness digest bytes, challenge random integer and sender's name, and encrypts the challenge using the given public key.
`Challenge(java.io.InputStream is)`

Method Summary
`oracle.security.crypto.core.AlgorithmIdentifier` | `getDigestAlgID()`
`java.math.BigInteger` | `getRandomInt(oracle.security.crypto.core.PrivateKey privKey)`
`oracle.security.crypto.cert.GeneralName` | `getSender(oracle.security.crypto.core.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(oracle.security.crypto.core.AlgorithmIdentifier digestAlg,
                     java.math.BigInteger randomInt,
                     oracle.security.crypto.cert.GeneralName sender,
                     oracle.security.crypto.core.PublicKey pubKey)
              throws oracle.security.crypto.core.AlgorithmIdentifierException,
                     oracle.security.crypto.core.InvalidKeyException,
                     oracle.security.crypto.core.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(byte[] witness,
                     java.math.BigInteger randomInt,
                     oracle.security.crypto.cert.GeneralName sender,
                     oracle.security.crypto.core.PublicKey pubKey)
              throws oracle.security.crypto.core.AlgorithmIdentifierException,
                     oracle.security.crypto.core.InvalidKeyException,
                     oracle.security.crypto.core.CipherException

  Create a new `Challenge` instance using the given witness digest bytes, challenge random integer and sender's name, and encrypts the challenge using the given public key. The digest algorithm will be left `null`, in keeping with the CMP protocol.
Parameters:
  `witness` - The digest of the challenge random integer's 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 oracle.security.crypto.core.AlgorithmIdentifier getDigestAlgID()

### getWitness

    public byte[] getWitness()

### getRandomInt

    public java.math.BigInteger getRandomInt(oracle.security.crypto.core.PrivateKey privKey)
                                      throws oracle.security.crypto.core.CipherException

  Throws:
    `oracle.security.crypto.core.CipherException`

### getSender

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

  Throws:
    `oracle.security.crypto.core.CipherException`

### toString

    public java.lang.String toString()

### input

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

  Specified by:
    `input` in interface `oracle.security.crypto.util.Streamable`
  Throws:
    `java.io.IOException`

### output

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

  Specified by:
    `output` in interface `oracle.security.crypto.util.Streamable`
  Throws:
    `java.io.IOException`

### length

    public int length()

  Specified by:
    `length` in interface `oracle.security.crypto.util.Streamable`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools PKI SDK CMP Java API Reference 10g Release 3 (10.1.3) B25373-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005, 2006 , Oracle. All rights reserved.