-
Notifications
You must be signed in to change notification settings - Fork 177
Expand file tree
/
Copy pathPCR_AllocateResponse.java
More file actions
97 lines (79 loc) · 2.83 KB
/
Copy pathPCR_AllocateResponse.java
File metadata and controls
97 lines (79 loc) · 2.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
package tss.tpm;
import tss.*;
// -----------This is an auto-generated file: do not edit
//>>>
/** This command is used to set the desired PCR allocation of PCR and algorithms. This
* command requires Platform Authorization.
*/
public class PCR_AllocateResponse extends RespStructure
{
/** YES if the allocation succeeded */
public byte allocationSuccess;
/** Maximum number of PCR that may be in a bank */
public int maxPCR;
/** Number of octets required to satisfy the request */
public int sizeNeeded;
/** Number of octets available. Computed before the allocation. */
public int sizeAvailable;
public PCR_AllocateResponse() {}
/** TpmMarshaller method */
@Override
public void toTpm(TpmBuffer buf)
{
buf.writeByte(allocationSuccess);
buf.writeInt(maxPCR);
buf.writeInt(sizeNeeded);
buf.writeInt(sizeAvailable);
}
/** TpmMarshaller method */
@Override
public void initFromTpm(TpmBuffer buf)
{
allocationSuccess = buf.readByte();
maxPCR = buf.readInt();
sizeNeeded = buf.readInt();
sizeAvailable = buf.readInt();
}
/** @deprecated Use {@link #toBytes()} instead
* @return Wire (marshaled) representation of this object
*/
public byte[] toTpm () { return toBytes(); }
/** Static marshaling helper
* @param byteBuf Wire representation of the object
* @return New object constructed from its wire representation
*/
public static PCR_AllocateResponse fromBytes (byte[] byteBuf)
{
return new TpmBuffer(byteBuf).createObj(PCR_AllocateResponse.class);
}
/** @deprecated Use {@link #fromBytes(byte[])} instead
* @param byteBuf Wire representation of the object
* @return New object constructed from its wire representation
*/
public static PCR_AllocateResponse fromTpm (byte[] byteBuf) { return fromBytes(byteBuf); }
/** Static marshaling helper
* @param buf Wire representation of the object
* @return New object constructed from its wire representation
*/
public static PCR_AllocateResponse fromTpm (TpmBuffer buf)
{
return buf.createObj(PCR_AllocateResponse.class);
}
@Override
public String toString()
{
TpmStructurePrinter _p = new TpmStructurePrinter("PCR_AllocateResponse");
toStringInternal(_p, 1);
_p.endStruct();
return _p.toString();
}
@Override
public void toStringInternal(TpmStructurePrinter _p, int d)
{
_p.add(d, "byte", "allocationSuccess", allocationSuccess);
_p.add(d, "int", "maxPCR", maxPCR);
_p.add(d, "int", "sizeNeeded", sizeNeeded);
_p.add(d, "int", "sizeAvailable", sizeAvailable);
}
}
//<<<