Skip navigation links

Oracle Fusion Middleware PKI SDK TSP Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10677-03


oracle.security.crypto.tsp
Class MessageImprint

java.lang.Object
  extended by oracle.security.crypto.tsp.MessageImprint

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

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

This class represents a MessageImprint object as defined in RFC 3161


Constructor Summary
MessageImprint(oracle.security.crypto.core.AlgorithmIdentifier alg, byte[] message, boolean hashMessage)
          Constructs a new MessageImprint object initialized with the given paramters.
MessageImprint(java.io.InputStream is)
          Constructs a MessageImprint object by reading in a DER-encoded MessageImprint from the given input stream.

 

Method Summary
 boolean equals(java.lang.Object o)
          Returns true if this object is "equal to" another object.
 oracle.security.crypto.core.AlgorithmIdentifier getHashAlgorithm()
          Returns the hashAlgorithm fiels of this object.
 byte[] getHashedMessage()
          Returns the hashedMessage field of this object
 void input(java.io.InputStream is)
          Initializes this object by reading in a DER-encoded TSAPolicyID object from the given input stream.
 int length()
          Returns the length of the DER encoding of this object in bytes.
 void output(java.io.OutputStream os)
          Writes the DER encoding of this object to the given output stream.
 java.lang.String toString()
          Returns a string representation ofthis object.

 

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

 

Constructor Detail

MessageImprint

public MessageImprint(oracle.security.crypto.core.AlgorithmIdentifier alg,
                      byte[] message,
                      boolean hashMessage)
               throws java.security.NoSuchAlgorithmException
Constructs a new MessageImprint object initialized with the given paramters.
Parameters:
alg - The hashing algorithm.
message - Either the data for which a hash is to be created or the hash itself.
hashMessage - If true, the data passed in the message parameter will be hashed; if false, the data passed in the message parameter is assumed to be the hash.
Throws:
AlgorithmIdentifierException - If the hashing algorithm is not supported
java.security.NoSuchAlgorithmException

MessageImprint

public MessageImprint(java.io.InputStream is)
               throws java.io.IOException
Constructs a MessageImprint object by reading in a DER-encoded MessageImprint from the given input stream.
Parameters:
is - The input stream.
Throws:
If - an I/O error occurs.
java.io.IOException

Method Detail

output

public void output(java.io.OutputStream os)
            throws java.io.IOException
Writes the DER encoding of this object to the given output stream.
Specified by:
output in interface oracle.security.crypto.util.Streamable
Parameters:
os - The output stream.
Throws:
java.io.IOException - If an I/O error occurs.

input

public void input(java.io.InputStream is)
           throws java.io.IOException
Initializes this object by reading in a DER-encoded TSAPolicyID object from the given input stream.
Specified by:
input in interface oracle.security.crypto.util.Streamable
Parameters:
is -
Throws:
java.io.IOException - If an I/O error occurs.

length

public int length()
Returns the length of the DER encoding of this object in bytes.
Specified by:
length in interface oracle.security.crypto.util.Streamable

getHashAlgorithm

public oracle.security.crypto.core.AlgorithmIdentifier getHashAlgorithm()
Returns the hashAlgorithm fiels of this object.

getHashedMessage

public byte[] getHashedMessage()
Returns the hashedMessage field of this object

equals

public boolean equals(java.lang.Object o)
Returns true if this object is "equal to" another object.
Overrides:
equals in class java.lang.Object
Parameters:
o - The other object.

toString

public java.lang.String toString()
Returns a string representation ofthis object.
Overrides:
toString in class java.lang.Object

Skip navigation links

Oracle Fusion Middleware PKI SDK TSP Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10677-03


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