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 PKIMessageHeader

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

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

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

The header structure for a CMP message. The header must, at a minimum, contain the sender name, recipient name and CMP version; all other fields are optional.

Constructor Summary
`PKIMessageHeader()` Creates a new, empty `PKIMessageHeader`.
`PKIMessageHeader(oracle.security.crypto.cert.GeneralName sender, oracle.security.crypto.cert.GeneralName recipient)` Create a new `PKIMessageHeader` with the given sender and recipient names, and the default version `PKIMessage.Version.CMP2000`.
`PKIMessageHeader(oracle.security.crypto.cert.GeneralName sender, oracle.security.crypto.cert.GeneralName recipient, PKIMessage.Version version)` Create a new `PKIMessageHeader` with the given sender and recipient names and CMP version.
`PKIMessageHeader(java.io.InputStream is)`

Method Summary
`void` | `addFreeText(java.lang.String text)`
`void` | `addGeneralInfo(oracle.security.crypto.asn1.ASN1ObjectID type)`
`void` | `addGeneralInfo(oracle.security.crypto.asn1.ASN1ObjectID type, oracle.security.crypto.asn1.ASN1Object value)`
`void` | `addGeneralInfo(InfoTypeAndValue info)`
`byte[]` | `generateSenderNonce()` Generates and sets a random 128-bit sender nonce.
`java.util.Vector` | `getFreeText()`
`oracle.security.crypto.cert.AttributeTypeAndValueList` | `getGeneralInfo()`
`java.util.Date` | `getMessageTime()`
`oracle.security.crypto.core.AlgorithmIdentifier` | `getProtectionAlgID()`
`oracle.security.crypto.cert.GeneralName` | `getRecipient()`
`byte[]` | `getRecipKID()`
`byte[]` | `getRecipNonce()`
`oracle.security.crypto.cert.GeneralName` | `getSender()`
`byte[]` | `getSenderKID()`
`byte[]` | `getSenderNonce()`
`byte[]` | `getTransactionID()`
`PKIMessage.Version` | `getVersion()`
`void` | `input(java.io.InputStream is)`
`int` | `length()`
`void` | `output(java.io.OutputStream os)`
`void` | `setMessageProtection(oracle.security.crypto.core.AlgorithmIdentifier macAlgID, byte[] password)` Sets up message protection using a password-based MAC value, for the given `PBMacAlgID`.
`void` | `setMessageProtection(oracle.security.crypto.core.AlgorithmIdentifier sigAlgID, oracle.security.crypto.core.PrivateKey privKey)` Sets up message protection using a signature value.
`void` | `setMessageProtection(byte[] password)` Sets up message protection using a password-based MAC value, with the default `PBMacAlgID` paramter values.
`void` | `setMessageProtection(oracle.security.crypto.core.PrivateKey privKey)` Sets up message protection using a signature value, with the default signature algorithm for the given key.
`void` | `setMessageTime(java.util.Date messageTime)`
`void` | `setRecipKID(byte[] recipKID)`
`void` | `setRecipNonce(byte[] recipNonce)`
`void` | `setSenderKID(byte[] senderKID)`
`void` | `setSenderNonce(byte[] senderNonce)`
`void` | `setTransactionID(byte[] transactionID)`
`java.lang.String` | `toString()`

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

Constructor Detail

### PKIMessageHeader

    public PKIMessageHeader()

  Creates a new, empty `PKIMessageHeader`. Since a valid instance must have the sender, recipient and version defined, this constructor is intended primarily for use in conjuntion with the `input(java.io.InputStream)` method.

### PKIMessageHeader

    public PKIMessageHeader(oracle.security.crypto.cert.GeneralName sender,
                            oracle.security.crypto.cert.GeneralName recipient)

  Create a new `PKIMessageHeader` with the given sender and recipient names, and the default version `PKIMessage.Version.CMP2000`.

### PKIMessageHeader

    public PKIMessageHeader(oracle.security.crypto.cert.GeneralName sender,
                            oracle.security.crypto.cert.GeneralName recipient,
                            PKIMessage.Version version)

  Create a new `PKIMessageHeader` with the given sender and recipient names and CMP version.
See Also:
  `PKIMessage.Version`

### PKIMessageHeader

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

Method Detail

### getSender

    public oracle.security.crypto.cert.GeneralName getSender()

### getRecipient

    public oracle.security.crypto.cert.GeneralName getRecipient()

### getVersion

    public PKIMessage.Version getVersion()

### setMessageTime

    public void setMessageTime(java.util.Date messageTime)

### getMessageTime

    public java.util.Date getMessageTime()

### setMessageProtection

    public void setMessageProtection(oracle.security.crypto.core.AlgorithmIdentifier macAlgID,
                                     byte[] password)
                              throws oracle.security.crypto.core.AlgorithmIdentifierException

  Sets up message protection using a password-based MAC value, for the given `PBMacAlgID`.
  Parameters:
    `macAlgID` - The MAC algorithm identifier for message protection. Must be `oracle.security.crypto.core.PBMacAlgID`.
    `password` - The password for the password-based MAC.
  Throws:
    `oracle.security.crypto.core.AlgorithmIdentifierException`

### setMessageProtection

    public void setMessageProtection(byte[] password)
                              throws oracle.security.crypto.core.AlgorithmIdentifierException

  Sets up message protection using a password-based MAC value, with the default `PBMacAlgID` paramter values.
  Throws:
    `oracle.security.crypto.core.AlgorithmIdentifierException`

### setMessageProtection

    public void setMessageProtection(oracle.security.crypto.core.AlgorithmIdentifier sigAlgID,
                                     oracle.security.crypto.core.PrivateKey privKey)
                              throws oracle.security.crypto.core.AlgorithmIdentifierException,
                                     oracle.security.crypto.core.InvalidKeyException

  Sets up message protection using a signature value.
  Throws:
    `oracle.security.crypto.core.AlgorithmIdentifierException`
    `oracle.security.crypto.core.InvalidKeyException`

### setMessageProtection

    public void setMessageProtection(oracle.security.crypto.core.PrivateKey privKey)
                              throws oracle.security.crypto.core.AlgorithmIdentifierException,
                                     oracle.security.crypto.core.InvalidKeyException

  Sets up message protection using a signature value, with the default signature algorithm for the given key.
  Throws:
    `oracle.security.crypto.core.AlgorithmIdentifierException`
    `oracle.security.crypto.core.InvalidKeyException`

### getProtectionAlgID

    public oracle.security.crypto.core.AlgorithmIdentifier getProtectionAlgID()

### setSenderKID

    public void setSenderKID(byte[] senderKID)

### getSenderKID

    public byte[] getSenderKID()

### setRecipKID

    public void setRecipKID(byte[] recipKID)

### getRecipKID

    public byte[] getRecipKID()

### setTransactionID

    public void setTransactionID(byte[] transactionID)

### getTransactionID

    public byte[] getTransactionID()

### setSenderNonce

    public void setSenderNonce(byte[] senderNonce)

### generateSenderNonce

    public byte[] generateSenderNonce()

  Generates and sets a random 128-bit sender nonce.
  Returns:
    The bytes of the generated nonce.

### getSenderNonce

    public byte[] getSenderNonce()

### setRecipNonce

    public void setRecipNonce(byte[] recipNonce)

### getRecipNonce

    public byte[] getRecipNonce()

### addFreeText

    public void addFreeText(java.lang.String text)

### getFreeText

    public java.util.Vector getFreeText()

### addGeneralInfo

    public void addGeneralInfo(InfoTypeAndValue info)

### addGeneralInfo

    public void addGeneralInfo(oracle.security.crypto.asn1.ASN1ObjectID type,
                               oracle.security.crypto.asn1.ASN1Object value)

### addGeneralInfo

    public void addGeneralInfo(oracle.security.crypto.asn1.ASN1ObjectID type)

### getGeneralInfo

    public oracle.security.crypto.cert.AttributeTypeAndValueList getGeneralInfo()

### 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.