|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object iaik.tc.tss.api.structs.common.TcBasicTypeDecoder
public class TcBasicTypeDecoder
This class provides a set of basic decoding methods for simple TCG defined types such as UINT32. The decoding assumes that the data is provided in big endian (MSB first) byte order by lower layers (TSS). Furthermore, it is assumed that structures are packed on byte boundaries. Both assumptions are based on the statements on "Endness of Structures" and "Byte Packing" in the TCG TPM Specification. Instances of this class take a a raw byte data blob with an optional initial offset. By calling the decode methods, the byte data is decoded according to the type of the decode method. The decodeUINT32 method for instance, reads 4 bytes (starting at the current offset), interprets them as a 4 byte integer and returns it. The internal offset is advanced by the size of the decoded type (4 bytes in the case of UNIT32).
Constructor Summary | |
---|---|
TcBasicTypeDecoder(TcBlobData data)
This constructor takes a byte data object to be decoded. |
|
TcBasicTypeDecoder(TcBlobData data,
int offset)
This constructor takes a byte data object to be decoded. |
Method Summary | |
---|---|
boolean |
decodeBoolean()
This method decodes a single byte and interprets it as a boolean value. |
short |
decodeByte()
This method decodes a single byte. |
TcBlobData |
decodeBytes(int numBytes)
This method returns the given number of bytes starting at the current offset. |
TcBlobData |
decodeBytes(long numBytes)
Overloaded method taking a long instead of an int as argument. |
long |
decodeTpmAlgorithmId()
This method decodes a TPM_ALGORITHM_ID. |
short |
decodeTpmAuthDataUsage()
This method decodes a TPM_AUTH_DATA_USAGE. |
int |
decodeTpmEncScheme()
This method decodes a TPM_ENC_SCHEME. |
long |
decodeTpmKeyFlags()
This method decodes a TPM_KEY_FLAGS. |
int |
decodeTpmKeyUsage()
This method decodes a TPM_KEY_USAGE. |
int |
decodeTpmSigScheme()
This method decodes a TPM_SIG_SCHEME. |
long |
decodeTssAlgorithmId()
This method decodes a TSS_ALGORITHM_ID. |
int |
decodeTssEncScheme()
This method decodes a TSS_ENC_SCHEME. |
long |
decodeTssEvenType()
This method decodes a TSS_EVEN_TYPE. |
long |
decodeTssFlag()
This method decodes a TSS_FLAG. |
long |
decodeTssHandle()
This method decodes a TSS_HANDLE. |
long |
decodeTssHContext()
This method decodes a TSS_HCONTEXT. |
long |
decodeTssHEncData()
This method decodes a TSS_HENC_DATA. |
long |
decodeTssHHash()
This method decodes a TSS_HHASH. |
long |
decodeTssHKey()
This method decodes a TSS_HKEY. |
long |
decodeTssHObjet()
This method decodes a TSS_HOBJECT. |
long |
decodeTssHPcrs()
This method decodes a TSS_HPCRS. |
long |
decodeTssHPolicy()
This method decodes a TSS_HPOLICY. |
long |
decodeTssHPS()
This method decodes a TSS_HPS. |
long |
decodeTssHTpm()
This method decodes a TSS_HTPM. |
long |
decodeTssKeyUsageId()
This method decodes a TSS_KEY_USAGE_ID. |
int |
decodeTssMigrationScheme()
This method decodes a TSS_MIGRATION_SCHEME. |
long |
decodeTssResult()
This method decodes a TSS_RESULT. |
int |
decodeTssSigScheme()
This method decodes a TSS_SIG_SCHEME. |
int |
decodeUINT16()
This method decodes an UINT16 type starting at the current offset. |
long |
decodeUINT32()
This method decodes an UINT32 type starting at the current offset. |
java.math.BigInteger |
decodeUINT64()
This method decodes an UINT64 type starting at the current offset. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TcBasicTypeDecoder(TcBlobData data)
data
- The byte data to be decoded.public TcBasicTypeDecoder(TcBlobData data, int offset)
data
- The byte data to be decoded.offset
- The initial offset.Method Detail |
---|
public long decodeUINT32()
public java.math.BigInteger decodeUINT64()
public int decodeUINT16()
public short decodeByte()
public TcBlobData decodeBytes(int numBytes)
numBytes
- number of bytes to decodepublic TcBlobData decodeBytes(long numBytes)
public boolean decodeBoolean()
public long decodeTssHandle()
public long decodeTssFlag()
public long decodeTssResult()
public long decodeTssHObjet()
public long decodeTssHContext()
public long decodeTssHPolicy()
public long decodeTssHTpm()
public long decodeTssHKey()
public long decodeTssHEncData()
public long decodeTssHPcrs()
public long decodeTssHHash()
public long decodeTssHPS()
public long decodeTssEvenType()
public int decodeTssMigrationScheme()
public long decodeTssAlgorithmId()
public long decodeTssKeyUsageId()
public int decodeTssEncScheme()
public int decodeTssSigScheme()
public int decodeTpmEncScheme()
public int decodeTpmSigScheme()
public long decodeTpmAlgorithmId()
public int decodeTpmKeyUsage()
public long decodeTpmKeyFlags()
public short decodeTpmAuthDataUsage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |