|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectiaik.tc.tss.impl.java.tsp.TcAttributes
iaik.tc.tss.impl.java.tsp.TcWorkingObject
iaik.tc.tss.impl.java.tsp.TcHash
public class TcHash
Field Summary | |
---|---|
static TcBlobData |
PKCS1_MD2_IDENTIFIER
PKCS#1 AlgorithmIdentifier for MD2. |
static TcBlobData |
PKCS1_MD4_IDENTIFIER
PKCS#1 AlgorithmIdentifier for MD4. |
static TcBlobData |
PKCS1_MD5_IDENTIFIER
PKCS#1 AlgorithmIdentifier for MD5. |
static TcBlobData |
PKCS1_SHA1_IDENTIFIER
PKCS#1 AlgorithmIdentifier for SHA1. |
Method Summary | |
---|---|
TcBlobData |
getHashValue()
This method returns the hash value of the hash object. |
void |
setAttribAlgIdentifier(long subFlag,
TcBlobData data)
This method sets the hash algorithm identifier if the init flags TcTssConstants.TSS_HASH_OTHER was provided upon object creation. |
void |
setHashValue(TcBlobData hashValue)
This method sets the hash value of the hash object. |
TcBlobData |
sign(TcIRsaKey key)
This method signs the hash data of the object with the provided signing key. |
java.lang.Object[] |
tickStampBlob(TcIRsaKey key,
TcTssValidation validationData)
Time stamps a hash blog |
void |
updateHashValue(TcBlobData data)
This method updates the hash object with new data. |
void |
verifySignature(TcBlobData signature,
TcIRsaKey key)
This method verifies the hash value of the hash object with a given signature. |
Methods inherited from class iaik.tc.tss.impl.java.tsp.TcAttributes |
---|
getAttribData, getAttribUint32, setAttribData, setAttribUint32 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface iaik.tc.tss.api.tspi.TcIAttributes |
---|
getAttribData, getAttribUint32, setAttribData, setAttribUint32 |
Field Detail |
---|
public static final TcBlobData PKCS1_SHA1_IDENTIFIER
public static final TcBlobData PKCS1_MD5_IDENTIFIER
public static final TcBlobData PKCS1_MD4_IDENTIFIER
public static final TcBlobData PKCS1_MD2_IDENTIFIER
Method Detail |
---|
public TcBlobData getHashValue() throws TcTssException
TcIHash
getHashValue
in interface TcIHash
TcTssException
public void setHashValue(TcBlobData hashValue) throws TcTssException
TcIHash
setHashValue
in interface TcIHash
hashValue
- The hash value to be set.
TcTssException
public TcBlobData sign(TcIRsaKey key) throws TcTssException
TcIHash
sign
in interface TcIHash
key
- Key object which should be used for the signature.
TcTssException
public void updateHashValue(TcBlobData data) throws TcTssException
TcIHash
TcTssConstants.TSS_HASH_SHA1
init flag.
Update means that that the provided data is appended to an internal buffer that already holds
the data from previous update operations. The SHA1 hash of this internal buffer can be obtained
using the TcIHash.getHashValue()
method. Calling updateHashValue(a) and
updateHashValue(b) is equivalent to updateHashValue(a + b).
updateHashValue
in interface TcIHash
data
- Blob containing the data to be updated.
TcTssException
public void verifySignature(TcBlobData signature, TcIRsaKey key) throws TcTssException
TcIHash
verifySignature
in interface TcIHash
signature
- The signature to be verified.key
- The key which should be used for the signature verification.
TcTssException
public void setAttribAlgIdentifier(long subFlag, TcBlobData data) throws TcTssException
TcTssConstants.TSS_HASH_OTHER
was provided upon object creation.
subFlag
- Ignored.data
- The hash DER encoded AlgorithmIdentifier as defined by the PKCS#1 specification.
{@link
- TcTssException}
TcTssException
public java.lang.Object[] tickStampBlob(TcIRsaKey key, TcTssValidation validationData) throws TcTssException
tickStampBlob
in interface TcIHash
key
- Key to sign the time stampvalidationData
- holds a nonce incorporated in stamping in the externalData_ field
TcTssException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |