-
Notifications
You must be signed in to change notification settings - Fork 160
/
RewrapResponse.java
89 lines (73 loc) · 2.83 KB
/
RewrapResponse.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
package tss.tpm;
import tss.*;
// -----------This is an auto-generated file: do not edit
//>>>
/** This command allows the TPM to serve in the role as a Duplication Authority. If proper
* authorization for use of the oldParent is provided, then an HMAC key and a symmetric
* key are recovered from inSymSeed and used to integrity check and decrypt inDuplicate.
* A new protection seed value is generated according to the methods appropriate for
* newParent and the blob is re-encrypted and a new integrity value is computed. The
* re-encrypted blob is returned in outDuplicate and the symmetric key returned in outSymKey.
*/
public class RewrapResponse extends RespStructure
{
/** An object encrypted using symmetric key derived from outSymSeed */
public TPM2B_PRIVATE outDuplicate;
/** Seed for a symmetric key protected by newParent asymmetric key */
public byte[] outSymSeed;
public RewrapResponse() {}
/** TpmMarshaller method */
@Override
public void toTpm(TpmBuffer buf)
{
outDuplicate.toTpm(buf);
buf.writeSizedByteBuf(outSymSeed);
}
/** TpmMarshaller method */
@Override
public void initFromTpm(TpmBuffer buf)
{
outDuplicate = TPM2B_PRIVATE.fromTpm(buf);
outSymSeed = buf.readSizedByteBuf();
}
/** @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 RewrapResponse fromBytes (byte[] byteBuf)
{
return new TpmBuffer(byteBuf).createObj(RewrapResponse.class);
}
/** @deprecated Use {@link #fromBytes(byte[])} instead
* @param byteBuf Wire representation of the object
* @return New object constructed from its wire representation
*/
public static RewrapResponse 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 RewrapResponse fromTpm (TpmBuffer buf)
{
return buf.createObj(RewrapResponse.class);
}
@Override
public String toString()
{
TpmStructurePrinter _p = new TpmStructurePrinter("RewrapResponse");
toStringInternal(_p, 1);
_p.endStruct();
return _p.toString();
}
@Override
public void toStringInternal(TpmStructurePrinter _p, int d)
{
_p.add(d, "TPM2B_PRIVATE", "outDuplicate", outDuplicate);
_p.add(d, "byte[]", "outSymSeed", outSymSeed);
}
}
//<<<