forked from microsoft/TSS.MSR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CommitResponse.java
102 lines (83 loc) · 2.95 KB
/
CommitResponse.java
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
98
99
100
101
102
package tss.tpm;
import tss.*;
// -----------This is an auto-generated file: do not edit
//>>>
/** TPM2_Commit() performs the first part of an ECC anonymous signing operation. The TPM
* will perform the point multiplications on the provided points and return intermediate
* signing values. The signHandle parameter shall refer to an ECC key and the signing
* scheme must be anonymous (TPM_RC_SCHEME).
*/
public class CommitResponse extends RespStructure
{
/** ECC point K [ds](x2, y2) */
public TPMS_ECC_POINT K;
/** ECC point L [r](x2, y2) */
public TPMS_ECC_POINT L;
/** ECC point E [r]P1 */
public TPMS_ECC_POINT E;
/** Least-significant 16 bits of commitCount */
public int counter;
public CommitResponse() {}
/** TpmMarshaller method */
@Override
public void toTpm(TpmBuffer buf)
{
buf.writeSizedObj(K);
buf.writeSizedObj(L);
buf.writeSizedObj(E);
buf.writeShort(counter);
}
/** TpmMarshaller method */
@Override
public void initFromTpm(TpmBuffer buf)
{
K = buf.createSizedObj(TPMS_ECC_POINT.class);
L = buf.createSizedObj(TPMS_ECC_POINT.class);
E = buf.createSizedObj(TPMS_ECC_POINT.class);
counter = buf.readShort();
}
/** @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 CommitResponse fromBytes (byte[] byteBuf)
{
return new TpmBuffer(byteBuf).createObj(CommitResponse.class);
}
/** @deprecated Use {@link #fromBytes(byte[])} instead
* @param byteBuf Wire representation of the object
* @return New object constructed from its wire representation
*/
public static CommitResponse 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 CommitResponse fromTpm (TpmBuffer buf)
{
return buf.createObj(CommitResponse.class);
}
@Override
public String toString()
{
TpmStructurePrinter _p = new TpmStructurePrinter("CommitResponse");
toStringInternal(_p, 1);
_p.endStruct();
return _p.toString();
}
@Override
public void toStringInternal(TpmStructurePrinter _p, int d)
{
_p.add(d, "TPMS_ECC_POINT", "K", K);
_p.add(d, "TPMS_ECC_POINT", "L", L);
_p.add(d, "TPMS_ECC_POINT", "E", E);
_p.add(d, "int", "counter", counter);
}
@Override
public SessEncInfo sessEncInfo() { return new SessEncInfo(2, 1); }
}
//<<<