de.datenzone.tpm4java
Class TPMSignedData

java.lang.Object
  extended by de.datenzone.tpm4java.TPMSignedData
All Implemented Interfaces:
java.io.Serializable

public class TPMSignedData
extends java.lang.Object
implements java.io.Serializable

TPMSignedData combines a TPMSignInfo structure with the signature, and provides an easy way to verify this signature.

Author:
Martin Hermanowski
See Also:
Serialized Form

Constructor Summary
TPMSignedData(TPMSignInfo info, byte[] signature)
           
 
Method Summary
 TPMSignInfo getInfo()
           
 byte[] getSignature()
           
 boolean verify(java.security.PublicKey pub)
          Verify the signature on the TPMSignInfo part with the given PublicKey.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TPMSignedData

public TPMSignedData(TPMSignInfo info,
                     byte[] signature)
Parameters:
info -
signature -
Method Detail

getInfo

public TPMSignInfo getInfo()
Returns:
the TPMSignInfo part

getSignature

public byte[] getSignature()
Returns:
the signature part

verify

public boolean verify(java.security.PublicKey pub)
               throws java.security.InvalidKeyException,
                      java.security.NoSuchAlgorithmException,
                      java.security.SignatureException
Verify the signature on the TPMSignInfo part with the given PublicKey.

Parameters:
pub -
Returns:
whether the signature could be verfified.
Throws:
java.security.InvalidKeyException
java.security.NoSuchAlgorithmException
java.security.SignatureException


http://tpm4java.datenzone.de/