public 参数解析:
standardEKPolicy:
837197674484b3f81a90cc8d46a5d724fd52d76e06520b64f2a1da1b331469aa(32bytes)
rawCmdBuf 命令数据:
800200000063000001314000000100000009400000090000010000000400000000003a0001000b000300720020837197674484b3f81a90cc8d46a5d724fd52d76e06520b64f2a1da1b331469aa00060080004300100800000000000000000000000000(99bytes)
rawRespBuf 返回数据:
80020000021a000000008000000000000203013a0001000b000300720020837197674484b3f81a90cc8d46a5d724fd52d76e06520b64f2a1da1b331469aa00060080004300100800000000000100ab46a231bd39c475c15060d2cbceb6f26ee1b72399186177ef20b20a74fa57a1adcbbeab13d1173dfff70d73306cd987bd18ac00c437e90d4aae5f2f40c2f4ba56d8cc2fbb659871f3ec4db03105238e43a36ac9ca604c651612a27a67249edbcb407cc451bc77f3f7eac4528e0abb1462116e09c78502d519af01006361318d9079eab8e500608f9a27074db4b1cb925805d466f13b69ec9cd604928276bf886e15cad54c0f4f13d4ce5a6f4b201dcfa9f8e8db3e01b4cdb6d343221e8680e50379710083d5be9623b2e65997636dceafb4f84d433eff7504e57a420d178c1ce43d29e358c293dff2ecf85a114e021940ccf82169c34eda9a7426e49f4d8d630037000000000020e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855010010000440000001000440000001000000205da041bac0ee3135aebb0cadfba497c6a1877fae832dd3d1f8f7a871b825e854802140000001004008eefbd184a4d047385b00fa847b7f8b526e2ef421614e99f62f1e4dd9a9b2cffa634b9a32738f5f34b08c2fcd86120e66d5e35b6364ee295041ef2c6601c4940022000b07265f24a416c92791af3080e155ec614c90a99a3e6fc6a753263c07812d321d0000010000(538bytes)
rawCmdBuf 命令数据:
8002 sessTag
00000063 0x63 = (99bytes) ,整个 rawCmdBuf 的字节数
00000131 cmdCode
40000001 handle value , authSizePos = 0E
00000009 L (表示长度为9)
40000009 000001 0000 9个字节,40000009 表示 sessHandle, 000001 表示 sessAttrs 0000 表示 authVal 的长度为 0
以下是 paramBuf:
000400000000003a0001000b0003007200
20
837197674484b3f81a90cc8d46a5d724fd52d76e06520b64f2a1da1b331469aa 策略字节
00060080004300100800000000000000000000000000(99bytes)
--------------
paramBuf :
000400000000003A0001000B000300720020837197674484B3F81A90CC8D46A5D724FD52D76E06520B64F2A1DA1B331469AA00060080004300100800000000000000000000000000
paramBuf 解析:
inSensitive = 0004 00000000 (LV结构)
inPublic = 003A 0001000B000300720020837197674484B3F81A90CC8D46A5D724FD52D76E06520B64F2A1DA1B331469AA00060080004300100800000000000000
outsideInfo = 0000
creationPCR = 00000000
--------------------
inPublic 解析:
003A 表示长度:
0001 表示 TPM_ALG_RSA
000B 表示 nameAlg 是 TPM_ALG_SHA256
00030072 表示 objectAttributes : {fixedTPM | fixedParent | sensitiveDataOrigin | userWithAuth | restricted | decrypt}
0020 L 表示策略的长度为 32字节
837197674484B3F81A90CC8D46A5D724FD52D76E06520B64F2A1DA1B331469AA 授权策略
0006008000430010080000000000 表示 parameters
0000 unique
*******
parameters 解析:
0006008000430010080000000000
0006 表示 TPM_ALG_AES
0080 表示 TPMI_AES_KEY_BITS
0043 表示 TPMI_SYM_MODE 是 TPM_ALG_CFB
0010 表示 TPMI_ALG_ASYM_SCHEME 是 TPM_ALG_NULL
0800 表示 TPMI_RSA_KEY_BITS 2048
00000000 表示 exponent
自从将visual studio从2010升级到2015后,发现调用接口的utf8格式字符串不能正常显示了,常常被莫名其妙截断,查了下,原来可以直接将变量拖到watch窗口中,在变量名后面手动添加,s8予以解决,
总结如下:
,s8:将字符串转成unicode展示
,数字 将变量拆分为数组显示, 数字是要显示多少位, 此法对const char*这类原始字符串非常有用
,x 16进制查看
,hr 查看Windows HRESULT解释
,wm Windows消息,例如0x0010, wm 显示 WM_CLOSE
.words
计算模板的hash
B3050924C09C8E6077C23B8AD45CA287EB4A121B656028E1F5D82CB115E71C3A
000B 表示 nameAlg 是 TPM_ALG_SHA256
P 0x50