iaik.tc.tss.api.structs.tpm
Class TcTpmNonce

Object
  extended by TcBasicTypeDecoder
      extended by TcCompositeTypeDecoder
          extended by TcTpmNonce

public class TcTpmNonce
extends TcCompositeTypeDecoder

A nonce is a random value that provides protection from replay and other attacks. Many of the commands and protocols in the TCG TPM specification require a nonce represented by this class.

TCPA 1.1b Main Specification, page number:
27

Constructor Summary
TcTpmNonce()
          Constructor - see superclass for details
TcTpmNonce(TcBlobData data)
          Constructor - see superclass for details
TcTpmNonce(TcBlobData data, int offset)
          Constructor - see superclass for details
TcTpmNonce(TcCompositeTypeDecoder composite)
          Constructor - see superclass for details
 
Method Summary
 boolean equals(Object obj)
          Returns true if the provided object is equal to this object.
 TcBlobData getEncoded()
          This method encodes the TPM_NONCE as a byte blob.
 TcBlobData getNonce()
          Returns contents of the nonce field.
 void setDigest(TcBlobData nonce)
          Sets the nonce field.
 String toString()
          This method returns a String representation of the object.
 
Methods inherited from class TcBasicTypeDecoder
decodeBoolean, decodeByte, decodeBytes, decodeBytes, decodeTpmAlgorithmId, decodeTpmAuthDataUsage, decodeTpmEncScheme, decodeTpmKeyFlags, decodeTpmKeyUsage, decodeTpmSigScheme, decodeTssAlgorithmId, decodeTssEncScheme, decodeTssEvenType, decodeTssFlag, decodeTssHandle, decodeTssHContext, decodeTssHEncData, decodeTssHHash, decodeTssHKey, decodeTssHObjet, decodeTssHPcrs, decodeTssHPolicy, decodeTssHPS, decodeTssHTpm, decodeTssKeyUsageId, decodeTssMigrationScheme, decodeTssResult, decodeTssSigScheme, decodeUINT16, decodeUINT32, decodeUINT64
 
Methods inherited from class Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TcTpmNonce

public TcTpmNonce()
Constructor - see superclass for details

See Also:
TcCompositeTypeDecoder.TcCompositeTypeDecoder()

TcTpmNonce

public TcTpmNonce(TcBlobData data)
Constructor - see superclass for details

See Also:
TcCompositeTypeDecoder.TcCompositeTypeDecoder(iaik.tc.tss.api.structs.common.TcBlobData)

TcTpmNonce

public TcTpmNonce(TcBlobData data,
                  int offset)
Constructor - see superclass for details

See Also:
TcCompositeTypeDecoder.TcCompositeTypeDecoder(iaik.tc.tss.api.structs.common.TcBlobData, int)

TcTpmNonce

public TcTpmNonce(TcCompositeTypeDecoder composite)
Constructor - see superclass for details

See Also:
TcCompositeTypeDecoder.TcCompositeTypeDecoder(iaik.tc.tss.api.structs.common.TcCompositeTypeDecoder)
Method Detail

getEncoded

public TcBlobData getEncoded()
This method encodes the TPM_NONCE as a byte blob.

Specified by:
getEncoded in class TcCompositeTypeDecoder
Returns:
byte blob to be passed to other layers (e.g. TSS)

toString

public String toString()
This method returns a String representation of the object.

Overrides:
toString in class TcCompositeTypeDecoder

equals

public boolean equals(Object obj)
Returns true if the provided object is equal to this object.

Overrides:
equals in class Object

getNonce

public TcBlobData getNonce()
Returns contents of the nonce field.


setDigest

public void setDigest(TcBlobData nonce)
Sets the nonce field.