Lines Matching refs:buffer
9 UINT16 uint8_t_Marshal(uint8_t* source, BYTE** buffer, INT32* size) { in uint8_t_Marshal() argument
27 memcpy(*buffer, &value_net, sizeof(uint8_t)); in uint8_t_Marshal()
28 *buffer += sizeof(uint8_t); in uint8_t_Marshal()
33 TPM_RC uint8_t_Unmarshal(uint8_t* target, BYTE** buffer, INT32* size) { in uint8_t_Unmarshal() argument
38 memcpy(&value_net, *buffer, sizeof(uint8_t)); in uint8_t_Unmarshal()
52 *buffer += sizeof(uint8_t); in uint8_t_Unmarshal()
57 UINT16 int8_t_Marshal(int8_t* source, BYTE** buffer, INT32* size) { in int8_t_Marshal() argument
75 memcpy(*buffer, &value_net, sizeof(int8_t)); in int8_t_Marshal()
76 *buffer += sizeof(int8_t); in int8_t_Marshal()
81 TPM_RC int8_t_Unmarshal(int8_t* target, BYTE** buffer, INT32* size) { in int8_t_Unmarshal() argument
86 memcpy(&value_net, *buffer, sizeof(int8_t)); in int8_t_Unmarshal()
100 *buffer += sizeof(int8_t); in int8_t_Unmarshal()
105 UINT16 uint16_t_Marshal(uint16_t* source, BYTE** buffer, INT32* size) { in uint16_t_Marshal() argument
123 memcpy(*buffer, &value_net, sizeof(uint16_t)); in uint16_t_Marshal()
124 *buffer += sizeof(uint16_t); in uint16_t_Marshal()
129 TPM_RC uint16_t_Unmarshal(uint16_t* target, BYTE** buffer, INT32* size) { in uint16_t_Unmarshal() argument
134 memcpy(&value_net, *buffer, sizeof(uint16_t)); in uint16_t_Unmarshal()
148 *buffer += sizeof(uint16_t); in uint16_t_Unmarshal()
153 UINT16 int16_t_Marshal(int16_t* source, BYTE** buffer, INT32* size) { in int16_t_Marshal() argument
171 memcpy(*buffer, &value_net, sizeof(int16_t)); in int16_t_Marshal()
172 *buffer += sizeof(int16_t); in int16_t_Marshal()
177 TPM_RC int16_t_Unmarshal(int16_t* target, BYTE** buffer, INT32* size) { in int16_t_Unmarshal() argument
182 memcpy(&value_net, *buffer, sizeof(int16_t)); in int16_t_Unmarshal()
196 *buffer += sizeof(int16_t); in int16_t_Unmarshal()
201 UINT16 uint32_t_Marshal(uint32_t* source, BYTE** buffer, INT32* size) { in uint32_t_Marshal() argument
219 memcpy(*buffer, &value_net, sizeof(uint32_t)); in uint32_t_Marshal()
220 *buffer += sizeof(uint32_t); in uint32_t_Marshal()
225 TPM_RC uint32_t_Unmarshal(uint32_t* target, BYTE** buffer, INT32* size) { in uint32_t_Unmarshal() argument
230 memcpy(&value_net, *buffer, sizeof(uint32_t)); in uint32_t_Unmarshal()
244 *buffer += sizeof(uint32_t); in uint32_t_Unmarshal()
249 UINT16 int32_t_Marshal(int32_t* source, BYTE** buffer, INT32* size) { in int32_t_Marshal() argument
267 memcpy(*buffer, &value_net, sizeof(int32_t)); in int32_t_Marshal()
268 *buffer += sizeof(int32_t); in int32_t_Marshal()
273 TPM_RC int32_t_Unmarshal(int32_t* target, BYTE** buffer, INT32* size) { in int32_t_Unmarshal() argument
278 memcpy(&value_net, *buffer, sizeof(int32_t)); in int32_t_Unmarshal()
292 *buffer += sizeof(int32_t); in int32_t_Unmarshal()
297 UINT16 uint64_t_Marshal(uint64_t* source, BYTE** buffer, INT32* size) { in uint64_t_Marshal() argument
315 memcpy(*buffer, &value_net, sizeof(uint64_t)); in uint64_t_Marshal()
316 *buffer += sizeof(uint64_t); in uint64_t_Marshal()
321 TPM_RC uint64_t_Unmarshal(uint64_t* target, BYTE** buffer, INT32* size) { in uint64_t_Unmarshal() argument
326 memcpy(&value_net, *buffer, sizeof(uint64_t)); in uint64_t_Unmarshal()
340 *buffer += sizeof(uint64_t); in uint64_t_Unmarshal()
345 UINT16 int64_t_Marshal(int64_t* source, BYTE** buffer, INT32* size) { in int64_t_Marshal() argument
363 memcpy(*buffer, &value_net, sizeof(int64_t)); in int64_t_Marshal()
364 *buffer += sizeof(int64_t); in int64_t_Marshal()
369 TPM_RC int64_t_Unmarshal(int64_t* target, BYTE** buffer, INT32* size) { in int64_t_Unmarshal() argument
374 memcpy(&value_net, *buffer, sizeof(int64_t)); in int64_t_Unmarshal()
388 *buffer += sizeof(int64_t); in int64_t_Unmarshal()
393 UINT16 BYTE_Marshal(BYTE* source, BYTE** buffer, INT32* size) { in BYTE_Marshal() argument
394 return uint8_t_Marshal(source, buffer, size); in BYTE_Marshal()
397 TPM_RC BYTE_Unmarshal(BYTE* target, BYTE** buffer, INT32* size) { in BYTE_Unmarshal() argument
398 return uint8_t_Unmarshal(target, buffer, size); in BYTE_Unmarshal()
401 UINT16 INT16_Marshal(INT16* source, BYTE** buffer, INT32* size) { in INT16_Marshal() argument
402 return int16_t_Marshal(source, buffer, size); in INT16_Marshal()
405 TPM_RC INT16_Unmarshal(INT16* target, BYTE** buffer, INT32* size) { in INT16_Unmarshal() argument
406 return int16_t_Unmarshal(target, buffer, size); in INT16_Unmarshal()
409 UINT16 INT32_Marshal(INT32* source, BYTE** buffer, INT32* size) { in INT32_Marshal() argument
410 return int32_t_Marshal(source, buffer, size); in INT32_Marshal()
413 TPM_RC INT32_Unmarshal(INT32* target, BYTE** buffer, INT32* size) { in INT32_Unmarshal() argument
414 return int32_t_Unmarshal(target, buffer, size); in INT32_Unmarshal()
417 UINT16 INT64_Marshal(INT64* source, BYTE** buffer, INT32* size) { in INT64_Marshal() argument
418 return int64_t_Marshal(source, buffer, size); in INT64_Marshal()
421 TPM_RC INT64_Unmarshal(INT64* target, BYTE** buffer, INT32* size) { in INT64_Unmarshal() argument
422 return int64_t_Unmarshal(target, buffer, size); in INT64_Unmarshal()
425 UINT16 INT8_Marshal(INT8* source, BYTE** buffer, INT32* size) { in INT8_Marshal() argument
426 return int8_t_Marshal(source, buffer, size); in INT8_Marshal()
429 TPM_RC INT8_Unmarshal(INT8* target, BYTE** buffer, INT32* size) { in INT8_Unmarshal() argument
430 return int8_t_Unmarshal(target, buffer, size); in INT8_Unmarshal()
433 UINT16 UINT16_Marshal(UINT16* source, BYTE** buffer, INT32* size) { in UINT16_Marshal() argument
434 return uint16_t_Marshal(source, buffer, size); in UINT16_Marshal()
437 TPM_RC UINT16_Unmarshal(UINT16* target, BYTE** buffer, INT32* size) { in UINT16_Unmarshal() argument
438 return uint16_t_Unmarshal(target, buffer, size); in UINT16_Unmarshal()
441 UINT16 TPM2B_ATTEST_Marshal(TPM2B_ATTEST* source, BYTE** buffer, INT32* size) { in TPM2B_ATTEST_Marshal() argument
444 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_ATTEST_Marshal()
446 total_size += BYTE_Marshal(&source->t.attestationData[i], buffer, size); in TPM2B_ATTEST_Marshal()
452 BYTE** buffer, in TPM2B_ATTEST_Unmarshal() argument
456 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_ATTEST_Unmarshal()
467 result = BYTE_Unmarshal(&target->t.attestationData[i], buffer, size); in TPM2B_ATTEST_Unmarshal()
475 UINT16 TPM2B_DIGEST_Marshal(TPM2B_DIGEST* source, BYTE** buffer, INT32* size) { in TPM2B_DIGEST_Marshal() argument
478 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_DIGEST_Marshal()
480 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_DIGEST_Marshal()
486 BYTE** buffer, in TPM2B_DIGEST_Unmarshal() argument
490 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_DIGEST_Unmarshal()
501 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_DIGEST_Unmarshal()
509 UINT16 TPM2B_AUTH_Marshal(TPM2B_AUTH* source, BYTE** buffer, INT32* size) { in TPM2B_AUTH_Marshal() argument
510 return TPM2B_DIGEST_Marshal(source, buffer, size); in TPM2B_AUTH_Marshal()
513 TPM_RC TPM2B_AUTH_Unmarshal(TPM2B_AUTH* target, BYTE** buffer, INT32* size) { in TPM2B_AUTH_Unmarshal() argument
514 return TPM2B_DIGEST_Unmarshal(target, buffer, size); in TPM2B_AUTH_Unmarshal()
518 BYTE** buffer, in TPM2B_CONTEXT_DATA_Marshal() argument
522 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_CONTEXT_DATA_Marshal()
524 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_CONTEXT_DATA_Marshal()
530 BYTE** buffer, in TPM2B_CONTEXT_DATA_Unmarshal() argument
534 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_CONTEXT_DATA_Unmarshal()
545 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_CONTEXT_DATA_Unmarshal()
554 BYTE** buffer, in TPM2B_CONTEXT_SENSITIVE_Marshal() argument
558 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_CONTEXT_SENSITIVE_Marshal()
560 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_CONTEXT_SENSITIVE_Marshal()
566 BYTE** buffer, in TPM2B_CONTEXT_SENSITIVE_Unmarshal() argument
570 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_CONTEXT_SENSITIVE_Unmarshal()
581 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_CONTEXT_SENSITIVE_Unmarshal()
589 UINT16 TPM_ALG_ID_Marshal(TPM_ALG_ID* source, BYTE** buffer, INT32* size) { in TPM_ALG_ID_Marshal() argument
590 return uint16_t_Marshal(source, buffer, size); in TPM_ALG_ID_Marshal()
593 TPM_RC TPM_ALG_ID_Unmarshal(TPM_ALG_ID* target, BYTE** buffer, INT32* size) { in TPM_ALG_ID_Unmarshal() argument
595 result = uint16_t_Unmarshal(target, buffer, size); in TPM_ALG_ID_Unmarshal()
782 UINT16 TPM2B_DATA_Marshal(TPM2B_DATA* source, BYTE** buffer, INT32* size) { in TPM2B_DATA_Marshal() argument
785 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_DATA_Marshal()
787 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_DATA_Marshal()
792 TPM_RC TPM2B_DATA_Unmarshal(TPM2B_DATA* target, BYTE** buffer, INT32* size) { in TPM2B_DATA_Unmarshal() argument
795 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_DATA_Unmarshal()
806 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_DATA_Unmarshal()
815 BYTE** buffer, in TPMA_LOCALITY_Marshal() argument
817 return uint8_t_Marshal((uint8_t*)source, buffer, size); in TPMA_LOCALITY_Marshal()
821 BYTE** buffer, in TPMA_LOCALITY_Unmarshal() argument
824 result = uint8_t_Unmarshal((uint8_t*)target, buffer, size); in TPMA_LOCALITY_Unmarshal()
831 UINT16 TPM2B_NAME_Marshal(TPM2B_NAME* source, BYTE** buffer, INT32* size) { in TPM2B_NAME_Marshal() argument
834 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_NAME_Marshal()
836 total_size += BYTE_Marshal(&source->t.name[i], buffer, size); in TPM2B_NAME_Marshal()
841 TPM_RC TPM2B_NAME_Unmarshal(TPM2B_NAME* target, BYTE** buffer, INT32* size) { in TPM2B_NAME_Unmarshal() argument
844 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_NAME_Unmarshal()
855 result = BYTE_Unmarshal(&target->t.name[i], buffer, size); in TPM2B_NAME_Unmarshal()
864 BYTE** buffer, in TPMI_ALG_HASH_Marshal() argument
866 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_HASH_Marshal()
870 BYTE** buffer, in TPMI_ALG_HASH_Unmarshal() argument
875 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_HASH_Unmarshal()
910 UINT16 UINT8_Marshal(UINT8* source, BYTE** buffer, INT32* size) { in UINT8_Marshal() argument
911 return uint8_t_Marshal(source, buffer, size); in UINT8_Marshal()
914 TPM_RC UINT8_Unmarshal(UINT8* target, BYTE** buffer, INT32* size) { in UINT8_Unmarshal() argument
915 return uint8_t_Unmarshal(target, buffer, size); in UINT8_Unmarshal()
919 BYTE** buffer, in TPMS_PCR_SELECTION_Marshal() argument
923 total_size += TPMI_ALG_HASH_Marshal(&source->hash, buffer, size); in TPMS_PCR_SELECTION_Marshal()
924 total_size += UINT8_Marshal(&source->sizeofSelect, buffer, size); in TPMS_PCR_SELECTION_Marshal()
926 total_size += BYTE_Marshal(&source->pcrSelect[i], buffer, size); in TPMS_PCR_SELECTION_Marshal()
932 BYTE** buffer, in TPMS_PCR_SELECTION_Unmarshal() argument
936 result = TPMI_ALG_HASH_Unmarshal(&target->hash, buffer, size, FALSE); in TPMS_PCR_SELECTION_Unmarshal()
940 result = UINT8_Unmarshal(&target->sizeofSelect, buffer, size); in TPMS_PCR_SELECTION_Unmarshal()
951 result = BYTE_Unmarshal(&target->pcrSelect[i], buffer, size); in TPMS_PCR_SELECTION_Unmarshal()
959 UINT16 UINT32_Marshal(UINT32* source, BYTE** buffer, INT32* size) { in UINT32_Marshal() argument
960 return uint32_t_Marshal(source, buffer, size); in UINT32_Marshal()
963 TPM_RC UINT32_Unmarshal(UINT32* target, BYTE** buffer, INT32* size) { in UINT32_Unmarshal() argument
964 return uint32_t_Unmarshal(target, buffer, size); in UINT32_Unmarshal()
968 BYTE** buffer, in TPML_PCR_SELECTION_Marshal() argument
972 total_size += UINT32_Marshal(&source->count, buffer, size); in TPML_PCR_SELECTION_Marshal()
975 TPMS_PCR_SELECTION_Marshal(&source->pcrSelections[i], buffer, size); in TPML_PCR_SELECTION_Marshal()
981 BYTE** buffer, in TPML_PCR_SELECTION_Unmarshal() argument
985 result = UINT32_Unmarshal(&target->count, buffer, size); in TPML_PCR_SELECTION_Unmarshal()
994 TPMS_PCR_SELECTION_Unmarshal(&target->pcrSelections[i], buffer, size); in TPML_PCR_SELECTION_Unmarshal()
1003 BYTE** buffer, in TPMS_CREATION_DATA_Marshal() argument
1006 total_size += TPML_PCR_SELECTION_Marshal(&source->pcrSelect, buffer, size); in TPMS_CREATION_DATA_Marshal()
1007 total_size += TPM2B_DIGEST_Marshal(&source->pcrDigest, buffer, size); in TPMS_CREATION_DATA_Marshal()
1008 total_size += TPMA_LOCALITY_Marshal(&source->locality, buffer, size); in TPMS_CREATION_DATA_Marshal()
1009 total_size += TPM_ALG_ID_Marshal(&source->parentNameAlg, buffer, size); in TPMS_CREATION_DATA_Marshal()
1010 total_size += TPM2B_NAME_Marshal(&source->parentName, buffer, size); in TPMS_CREATION_DATA_Marshal()
1011 total_size += TPM2B_NAME_Marshal(&source->parentQualifiedName, buffer, size); in TPMS_CREATION_DATA_Marshal()
1012 total_size += TPM2B_DATA_Marshal(&source->outsideInfo, buffer, size); in TPMS_CREATION_DATA_Marshal()
1017 BYTE** buffer, in TPMS_CREATION_DATA_Unmarshal() argument
1020 result = TPML_PCR_SELECTION_Unmarshal(&target->pcrSelect, buffer, size); in TPMS_CREATION_DATA_Unmarshal()
1024 result = TPM2B_DIGEST_Unmarshal(&target->pcrDigest, buffer, size); in TPMS_CREATION_DATA_Unmarshal()
1028 result = TPMA_LOCALITY_Unmarshal(&target->locality, buffer, size); in TPMS_CREATION_DATA_Unmarshal()
1032 result = TPM_ALG_ID_Unmarshal(&target->parentNameAlg, buffer, size); in TPMS_CREATION_DATA_Unmarshal()
1036 result = TPM2B_NAME_Unmarshal(&target->parentName, buffer, size); in TPMS_CREATION_DATA_Unmarshal()
1040 result = TPM2B_NAME_Unmarshal(&target->parentQualifiedName, buffer, size); in TPMS_CREATION_DATA_Unmarshal()
1044 result = TPM2B_DATA_Unmarshal(&target->outsideInfo, buffer, size); in TPMS_CREATION_DATA_Unmarshal()
1052 BYTE** buffer, in TPM2B_CREATION_DATA_Marshal() argument
1055 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_CREATION_DATA_Marshal()
1057 TPMS_CREATION_DATA_Marshal(&source->t.creationData, buffer, size); in TPM2B_CREATION_DATA_Marshal()
1059 BYTE* size_location = *buffer - total_size; in TPM2B_CREATION_DATA_Marshal()
1068 BYTE** buffer, in TPM2B_CREATION_DATA_Unmarshal() argument
1073 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_CREATION_DATA_Unmarshal()
1080 result = TPMS_CREATION_DATA_Unmarshal(&target->t.creationData, buffer, size); in TPM2B_CREATION_DATA_Unmarshal()
1092 BYTE** buffer, in TPM2B_DIGEST_VALUES_Marshal() argument
1096 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_DIGEST_VALUES_Marshal()
1098 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_DIGEST_VALUES_Marshal()
1104 BYTE** buffer, in TPM2B_DIGEST_VALUES_Unmarshal() argument
1108 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_DIGEST_VALUES_Unmarshal()
1119 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_DIGEST_VALUES_Unmarshal()
1128 BYTE** buffer, in TPM2B_ECC_PARAMETER_Marshal() argument
1132 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_ECC_PARAMETER_Marshal()
1134 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_ECC_PARAMETER_Marshal()
1140 BYTE** buffer, in TPM2B_ECC_PARAMETER_Unmarshal() argument
1144 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_ECC_PARAMETER_Unmarshal()
1155 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_ECC_PARAMETER_Unmarshal()
1164 BYTE** buffer, in TPMS_ECC_POINT_Marshal() argument
1167 total_size += TPM2B_ECC_PARAMETER_Marshal(&source->x, buffer, size); in TPMS_ECC_POINT_Marshal()
1168 total_size += TPM2B_ECC_PARAMETER_Marshal(&source->y, buffer, size); in TPMS_ECC_POINT_Marshal()
1173 BYTE** buffer, in TPMS_ECC_POINT_Unmarshal() argument
1176 result = TPM2B_ECC_PARAMETER_Unmarshal(&target->x, buffer, size); in TPMS_ECC_POINT_Unmarshal()
1180 result = TPM2B_ECC_PARAMETER_Unmarshal(&target->y, buffer, size); in TPMS_ECC_POINT_Unmarshal()
1188 BYTE** buffer, in TPM2B_ECC_POINT_Marshal() argument
1191 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_ECC_POINT_Marshal()
1192 total_size += TPMS_ECC_POINT_Marshal(&source->t.point, buffer, size); in TPM2B_ECC_POINT_Marshal()
1194 BYTE* size_location = *buffer - total_size; in TPM2B_ECC_POINT_Marshal()
1203 BYTE** buffer, in TPM2B_ECC_POINT_Unmarshal() argument
1208 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_ECC_POINT_Unmarshal()
1215 result = TPMS_ECC_POINT_Unmarshal(&target->t.point, buffer, size); in TPM2B_ECC_POINT_Unmarshal()
1227 BYTE** buffer, in TPM2B_ENCRYPTED_SECRET_Marshal() argument
1231 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_ENCRYPTED_SECRET_Marshal()
1233 total_size += BYTE_Marshal(&source->t.secret[i], buffer, size); in TPM2B_ENCRYPTED_SECRET_Marshal()
1239 BYTE** buffer, in TPM2B_ENCRYPTED_SECRET_Unmarshal() argument
1243 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_ENCRYPTED_SECRET_Unmarshal()
1254 result = BYTE_Unmarshal(&target->t.secret[i], buffer, size); in TPM2B_ENCRYPTED_SECRET_Unmarshal()
1262 UINT16 TPM2B_EVENT_Marshal(TPM2B_EVENT* source, BYTE** buffer, INT32* size) { in TPM2B_EVENT_Marshal() argument
1265 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_EVENT_Marshal()
1267 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_EVENT_Marshal()
1272 TPM_RC TPM2B_EVENT_Unmarshal(TPM2B_EVENT* target, BYTE** buffer, INT32* size) { in TPM2B_EVENT_Unmarshal() argument
1275 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_EVENT_Unmarshal()
1286 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_EVENT_Unmarshal()
1295 BYTE** buffer, in TPM2B_ID_OBJECT_Marshal() argument
1299 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_ID_OBJECT_Marshal()
1301 total_size += BYTE_Marshal(&source->t.credential[i], buffer, size); in TPM2B_ID_OBJECT_Marshal()
1307 BYTE** buffer, in TPM2B_ID_OBJECT_Unmarshal() argument
1311 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_ID_OBJECT_Unmarshal()
1322 result = BYTE_Unmarshal(&target->t.credential[i], buffer, size); in TPM2B_ID_OBJECT_Unmarshal()
1330 UINT16 TPM2B_IV_Marshal(TPM2B_IV* source, BYTE** buffer, INT32* size) { in TPM2B_IV_Marshal() argument
1333 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_IV_Marshal()
1335 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_IV_Marshal()
1340 TPM_RC TPM2B_IV_Unmarshal(TPM2B_IV* target, BYTE** buffer, INT32* size) { in TPM2B_IV_Unmarshal() argument
1343 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_IV_Unmarshal()
1354 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_IV_Unmarshal()
1363 BYTE** buffer, in TPM2B_MAX_BUFFER_Marshal() argument
1367 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_MAX_BUFFER_Marshal()
1369 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_MAX_BUFFER_Marshal()
1375 BYTE** buffer, in TPM2B_MAX_BUFFER_Unmarshal() argument
1379 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_MAX_BUFFER_Unmarshal()
1390 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_MAX_BUFFER_Unmarshal()
1399 BYTE** buffer, in TPM2B_MAX_NV_BUFFER_Marshal() argument
1403 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_MAX_NV_BUFFER_Marshal()
1405 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_MAX_NV_BUFFER_Marshal()
1411 BYTE** buffer, in TPM2B_MAX_NV_BUFFER_Unmarshal() argument
1415 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_MAX_NV_BUFFER_Unmarshal()
1426 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_MAX_NV_BUFFER_Unmarshal()
1434 UINT16 TPM2B_NONCE_Marshal(TPM2B_NONCE* source, BYTE** buffer, INT32* size) { in TPM2B_NONCE_Marshal() argument
1435 return TPM2B_DIGEST_Marshal(source, buffer, size); in TPM2B_NONCE_Marshal()
1438 TPM_RC TPM2B_NONCE_Unmarshal(TPM2B_NONCE* target, BYTE** buffer, INT32* size) { in TPM2B_NONCE_Unmarshal() argument
1439 return TPM2B_DIGEST_Unmarshal(target, buffer, size); in TPM2B_NONCE_Unmarshal()
1443 BYTE** buffer, in TPMI_RH_NV_INDEX_Marshal() argument
1445 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_NV_INDEX_Marshal()
1449 BYTE** buffer, in TPMI_RH_NV_INDEX_Unmarshal() argument
1453 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_NV_INDEX_Unmarshal()
1466 UINT16 TPMA_NV_Marshal(TPMA_NV* source, BYTE** buffer, INT32* size) { in TPMA_NV_Marshal() argument
1467 return uint32_t_Marshal((uint32_t*)source, buffer, size); in TPMA_NV_Marshal()
1470 TPM_RC TPMA_NV_Unmarshal(TPMA_NV* target, BYTE** buffer, INT32* size) { in TPMA_NV_Unmarshal() argument
1472 result = uint32_t_Unmarshal((uint32_t*)target, buffer, size); in TPMA_NV_Unmarshal()
1486 BYTE** buffer, in TPMS_NV_PUBLIC_Marshal() argument
1489 total_size += TPMI_RH_NV_INDEX_Marshal(&source->nvIndex, buffer, size); in TPMS_NV_PUBLIC_Marshal()
1490 total_size += TPMI_ALG_HASH_Marshal(&source->nameAlg, buffer, size); in TPMS_NV_PUBLIC_Marshal()
1491 total_size += TPMA_NV_Marshal(&source->attributes, buffer, size); in TPMS_NV_PUBLIC_Marshal()
1492 total_size += TPM2B_DIGEST_Marshal(&source->authPolicy, buffer, size); in TPMS_NV_PUBLIC_Marshal()
1493 total_size += UINT16_Marshal(&source->dataSize, buffer, size); in TPMS_NV_PUBLIC_Marshal()
1498 BYTE** buffer, in TPMS_NV_PUBLIC_Unmarshal() argument
1501 result = TPMI_RH_NV_INDEX_Unmarshal(&target->nvIndex, buffer, size); in TPMS_NV_PUBLIC_Unmarshal()
1505 result = TPMI_ALG_HASH_Unmarshal(&target->nameAlg, buffer, size, FALSE); in TPMS_NV_PUBLIC_Unmarshal()
1509 result = TPMA_NV_Unmarshal(&target->attributes, buffer, size); in TPMS_NV_PUBLIC_Unmarshal()
1513 result = TPM2B_DIGEST_Unmarshal(&target->authPolicy, buffer, size); in TPMS_NV_PUBLIC_Unmarshal()
1517 result = UINT16_Unmarshal(&target->dataSize, buffer, size); in TPMS_NV_PUBLIC_Unmarshal()
1528 BYTE** buffer, in TPM2B_NV_PUBLIC_Marshal() argument
1531 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_NV_PUBLIC_Marshal()
1532 total_size += TPMS_NV_PUBLIC_Marshal(&source->t.nvPublic, buffer, size); in TPM2B_NV_PUBLIC_Marshal()
1534 BYTE* size_location = *buffer - total_size; in TPM2B_NV_PUBLIC_Marshal()
1543 BYTE** buffer, in TPM2B_NV_PUBLIC_Unmarshal() argument
1548 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_NV_PUBLIC_Unmarshal()
1555 result = TPMS_NV_PUBLIC_Unmarshal(&target->t.nvPublic, buffer, size); in TPM2B_NV_PUBLIC_Unmarshal()
1567 BYTE** buffer, in TPM2B_OPERAND_Marshal() argument
1569 return TPM2B_DIGEST_Marshal(source, buffer, size); in TPM2B_OPERAND_Marshal()
1573 BYTE** buffer, in TPM2B_OPERAND_Unmarshal() argument
1575 return TPM2B_DIGEST_Unmarshal(target, buffer, size); in TPM2B_OPERAND_Unmarshal()
1579 BYTE** buffer, in TPM2B_PRIVATE_Marshal() argument
1583 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_PRIVATE_Marshal()
1585 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_PRIVATE_Marshal()
1591 BYTE** buffer, in TPM2B_PRIVATE_Unmarshal() argument
1595 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_PRIVATE_Unmarshal()
1606 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_PRIVATE_Unmarshal()
1615 BYTE** buffer, in TPM2B_PRIVATE_KEY_RSA_Marshal() argument
1619 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_PRIVATE_KEY_RSA_Marshal()
1621 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_PRIVATE_KEY_RSA_Marshal()
1627 BYTE** buffer, in TPM2B_PRIVATE_KEY_RSA_Unmarshal() argument
1631 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_PRIVATE_KEY_RSA_Unmarshal()
1642 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_PRIVATE_KEY_RSA_Unmarshal()
1652 BYTE** buffer, in TPM2B_PRIVATE_VENDOR_SPECIFIC_Marshal() argument
1656 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_PRIVATE_VENDOR_SPECIFIC_Marshal()
1658 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_PRIVATE_VENDOR_SPECIFIC_Marshal()
1665 BYTE** buffer, in TPM2B_PRIVATE_VENDOR_SPECIFIC_Unmarshal() argument
1669 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_PRIVATE_VENDOR_SPECIFIC_Unmarshal()
1680 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_PRIVATE_VENDOR_SPECIFIC_Unmarshal()
1688 UINT16 TPMA_OBJECT_Marshal(TPMA_OBJECT* source, BYTE** buffer, INT32* size) { in TPMA_OBJECT_Marshal() argument
1689 return uint32_t_Marshal((uint32_t*)source, buffer, size); in TPMA_OBJECT_Marshal()
1692 TPM_RC TPMA_OBJECT_Unmarshal(TPMA_OBJECT* target, BYTE** buffer, INT32* size) { in TPMA_OBJECT_Unmarshal() argument
1694 result = uint32_t_Unmarshal((uint32_t*)target, buffer, size); in TPMA_OBJECT_Unmarshal()
1717 BYTE** buffer, in TPMI_ALG_PUBLIC_Marshal() argument
1719 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_PUBLIC_Marshal()
1723 BYTE** buffer, in TPMI_ALG_PUBLIC_Unmarshal() argument
1727 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_PUBLIC_Unmarshal()
1754 BYTE** buffer, in TPM2B_PUBLIC_KEY_RSA_Marshal() argument
1758 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_PUBLIC_KEY_RSA_Marshal()
1760 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_PUBLIC_KEY_RSA_Marshal()
1766 BYTE** buffer, in TPM2B_PUBLIC_KEY_RSA_Unmarshal() argument
1770 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_PUBLIC_KEY_RSA_Unmarshal()
1781 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_PUBLIC_KEY_RSA_Unmarshal()
1790 BYTE** buffer, in TPMU_PUBLIC_ID_Marshal() argument
1796 return TPM2B_DIGEST_Marshal((TPM2B_DIGEST*)&source->keyedHash, buffer, in TPMU_PUBLIC_ID_Marshal()
1801 return TPM2B_DIGEST_Marshal((TPM2B_DIGEST*)&source->sym, buffer, size); in TPMU_PUBLIC_ID_Marshal()
1806 buffer, size); in TPMU_PUBLIC_ID_Marshal()
1810 return TPMS_ECC_POINT_Marshal((TPMS_ECC_POINT*)&source->ecc, buffer, in TPMU_PUBLIC_ID_Marshal()
1818 BYTE** buffer, in TPMU_PUBLIC_ID_Unmarshal() argument
1824 return TPM2B_DIGEST_Unmarshal((TPM2B_DIGEST*)&target->keyedHash, buffer, in TPMU_PUBLIC_ID_Unmarshal()
1829 return TPM2B_DIGEST_Unmarshal((TPM2B_DIGEST*)&target->sym, buffer, size); in TPMU_PUBLIC_ID_Unmarshal()
1834 buffer, size); in TPMU_PUBLIC_ID_Unmarshal()
1838 return TPMS_ECC_POINT_Unmarshal((TPMS_ECC_POINT*)&target->ecc, buffer, in TPMU_PUBLIC_ID_Unmarshal()
1845 UINT16 TPM_KEY_BITS_Marshal(TPM_KEY_BITS* source, BYTE** buffer, INT32* size) { in TPM_KEY_BITS_Marshal() argument
1846 return uint16_t_Marshal(source, buffer, size); in TPM_KEY_BITS_Marshal()
1850 BYTE** buffer, in TPM_KEY_BITS_Unmarshal() argument
1852 return uint16_t_Unmarshal(target, buffer, size); in TPM_KEY_BITS_Unmarshal()
1856 BYTE** buffer, in TPMI_AES_KEY_BITS_Marshal() argument
1858 return TPM_KEY_BITS_Marshal(source, buffer, size); in TPMI_AES_KEY_BITS_Marshal()
1862 BYTE** buffer, in TPMI_AES_KEY_BITS_Unmarshal() argument
1869 result = TPM_KEY_BITS_Unmarshal(target, buffer, size); in TPMI_AES_KEY_BITS_Unmarshal()
1886 BYTE** buffer, in TPMI_SM4_KEY_BITS_Marshal() argument
1888 return TPM_KEY_BITS_Marshal(source, buffer, size); in TPMI_SM4_KEY_BITS_Marshal()
1892 BYTE** buffer, in TPMI_SM4_KEY_BITS_Unmarshal() argument
1899 result = TPM_KEY_BITS_Unmarshal(target, buffer, size); in TPMI_SM4_KEY_BITS_Unmarshal()
1916 BYTE** buffer, in TPMI_CAMELLIA_KEY_BITS_Marshal() argument
1918 return TPM_KEY_BITS_Marshal(source, buffer, size); in TPMI_CAMELLIA_KEY_BITS_Marshal()
1922 BYTE** buffer, in TPMI_CAMELLIA_KEY_BITS_Unmarshal() argument
1929 result = TPM_KEY_BITS_Unmarshal(target, buffer, size); in TPMI_CAMELLIA_KEY_BITS_Unmarshal()
1946 BYTE** buffer, in TPMU_SYM_KEY_BITS_Marshal() argument
1952 return TPMI_AES_KEY_BITS_Marshal((TPMI_AES_KEY_BITS*)&source->aes, buffer, in TPMU_SYM_KEY_BITS_Marshal()
1957 return TPMI_SM4_KEY_BITS_Marshal((TPMI_SM4_KEY_BITS*)&source->sm4, buffer, in TPMU_SYM_KEY_BITS_Marshal()
1963 (TPMI_CAMELLIA_KEY_BITS*)&source->camellia, buffer, size); in TPMU_SYM_KEY_BITS_Marshal()
1967 return TPMI_ALG_HASH_Marshal((TPMI_ALG_HASH*)&source->xor_, buffer, size); in TPMU_SYM_KEY_BITS_Marshal()
1978 BYTE** buffer, in TPMU_SYM_KEY_BITS_Unmarshal() argument
1985 buffer, size); in TPMU_SYM_KEY_BITS_Unmarshal()
1990 buffer, size); in TPMU_SYM_KEY_BITS_Unmarshal()
1995 (TPMI_CAMELLIA_KEY_BITS*)&target->camellia, buffer, size); in TPMU_SYM_KEY_BITS_Unmarshal()
1999 return TPMI_ALG_HASH_Unmarshal(&target->xor_, buffer, size, FALSE); in TPMU_SYM_KEY_BITS_Unmarshal()
2010 BYTE** buffer, in TPMI_ALG_SYM_MODE_Marshal() argument
2012 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_SYM_MODE_Marshal()
2016 BYTE** buffer, in TPMI_ALG_SYM_MODE_Unmarshal() argument
2021 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_SYM_MODE_Unmarshal()
2054 BYTE** buffer, in TPMU_SYM_MODE_Marshal() argument
2060 return TPMI_ALG_SYM_MODE_Marshal((TPMI_ALG_SYM_MODE*)&source->aes, buffer, in TPMU_SYM_MODE_Marshal()
2065 return TPMI_ALG_SYM_MODE_Marshal((TPMI_ALG_SYM_MODE*)&source->sm4, buffer, in TPMU_SYM_MODE_Marshal()
2071 buffer, size); in TPMU_SYM_MODE_Marshal()
2086 BYTE** buffer, in TPMU_SYM_MODE_Unmarshal() argument
2092 return TPMI_ALG_SYM_MODE_Unmarshal(&target->aes, buffer, size, FALSE); in TPMU_SYM_MODE_Unmarshal()
2096 return TPMI_ALG_SYM_MODE_Unmarshal(&target->sm4, buffer, size, FALSE); in TPMU_SYM_MODE_Unmarshal()
2100 return TPMI_ALG_SYM_MODE_Unmarshal(&target->camellia, buffer, size, in TPMU_SYM_MODE_Unmarshal()
2116 BYTE** buffer, in TPMI_ALG_SYM_OBJECT_Marshal() argument
2118 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_SYM_OBJECT_Marshal()
2122 BYTE** buffer, in TPMI_ALG_SYM_OBJECT_Unmarshal() argument
2127 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_SYM_OBJECT_Unmarshal()
2154 BYTE** buffer, in TPMT_SYM_DEF_OBJECT_Marshal() argument
2157 total_size += TPMI_ALG_SYM_OBJECT_Marshal(&source->algorithm, buffer, size); in TPMT_SYM_DEF_OBJECT_Marshal()
2158 total_size += TPMU_SYM_KEY_BITS_Marshal(&source->keyBits, buffer, size, in TPMT_SYM_DEF_OBJECT_Marshal()
2161 TPMU_SYM_MODE_Marshal(&source->mode, buffer, size, source->algorithm); in TPMT_SYM_DEF_OBJECT_Marshal()
2166 BYTE** buffer, in TPMT_SYM_DEF_OBJECT_Unmarshal() argument
2170 TPMI_ALG_SYM_OBJECT_Unmarshal(&target->algorithm, buffer, size, TRUE); in TPMT_SYM_DEF_OBJECT_Unmarshal()
2174 result = TPMU_SYM_KEY_BITS_Unmarshal(&target->keyBits, buffer, size, in TPMT_SYM_DEF_OBJECT_Unmarshal()
2180 TPMU_SYM_MODE_Unmarshal(&target->mode, buffer, size, target->algorithm); in TPMT_SYM_DEF_OBJECT_Unmarshal()
2188 BYTE** buffer, in TPMI_ALG_RSA_SCHEME_Marshal() argument
2190 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_RSA_SCHEME_Marshal()
2194 BYTE** buffer, in TPMI_ALG_RSA_SCHEME_Unmarshal() argument
2199 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_RSA_SCHEME_Unmarshal()
2229 BYTE** buffer, in TPMS_SCHEME_HASH_Marshal() argument
2232 total_size += TPMI_ALG_HASH_Marshal(&source->hashAlg, buffer, size); in TPMS_SCHEME_HASH_Marshal()
2237 BYTE** buffer, in TPMS_SCHEME_HASH_Unmarshal() argument
2240 result = TPMI_ALG_HASH_Unmarshal(&target->hashAlg, buffer, size, FALSE); in TPMS_SCHEME_HASH_Unmarshal()
2248 BYTE** buffer, in TPMS_SIG_SCHEME_RSAPSS_Marshal() argument
2250 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SIG_SCHEME_RSAPSS_Marshal()
2254 BYTE** buffer, in TPMS_SIG_SCHEME_RSAPSS_Unmarshal() argument
2256 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SIG_SCHEME_RSAPSS_Unmarshal()
2260 BYTE** buffer, in TPMS_SIG_SCHEME_SM2_Marshal() argument
2262 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SIG_SCHEME_SM2_Marshal()
2266 BYTE** buffer, in TPMS_SIG_SCHEME_SM2_Unmarshal() argument
2268 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SIG_SCHEME_SM2_Unmarshal()
2272 BYTE** buffer, in TPMS_SIG_SCHEME_ECSCHNORR_Marshal() argument
2274 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SIG_SCHEME_ECSCHNORR_Marshal()
2278 BYTE** buffer, in TPMS_SIG_SCHEME_ECSCHNORR_Unmarshal() argument
2280 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SIG_SCHEME_ECSCHNORR_Unmarshal()
2284 BYTE** buffer, in TPMS_SCHEME_ECDAA_Marshal() argument
2287 total_size += TPMI_ALG_HASH_Marshal(&source->hashAlg, buffer, size); in TPMS_SCHEME_ECDAA_Marshal()
2288 total_size += UINT16_Marshal(&source->count, buffer, size); in TPMS_SCHEME_ECDAA_Marshal()
2293 BYTE** buffer, in TPMS_SCHEME_ECDAA_Unmarshal() argument
2296 result = TPMI_ALG_HASH_Unmarshal(&target->hashAlg, buffer, size, FALSE); in TPMS_SCHEME_ECDAA_Unmarshal()
2300 result = UINT16_Unmarshal(&target->count, buffer, size); in TPMS_SCHEME_ECDAA_Unmarshal()
2308 BYTE** buffer, in TPMS_SIG_SCHEME_ECDAA_Marshal() argument
2310 return TPMS_SCHEME_ECDAA_Marshal(source, buffer, size); in TPMS_SIG_SCHEME_ECDAA_Marshal()
2314 BYTE** buffer, in TPMS_SIG_SCHEME_ECDAA_Unmarshal() argument
2316 return TPMS_SCHEME_ECDAA_Unmarshal(target, buffer, size); in TPMS_SIG_SCHEME_ECDAA_Unmarshal()
2320 BYTE** buffer, in TPMS_KEY_SCHEME_ECDH_Marshal() argument
2322 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_KEY_SCHEME_ECDH_Marshal()
2326 BYTE** buffer, in TPMS_KEY_SCHEME_ECDH_Unmarshal() argument
2328 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_KEY_SCHEME_ECDH_Unmarshal()
2332 BYTE** buffer, in TPMS_KEY_SCHEME_ECMQV_Marshal() argument
2334 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_KEY_SCHEME_ECMQV_Marshal()
2338 BYTE** buffer, in TPMS_KEY_SCHEME_ECMQV_Unmarshal() argument
2340 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_KEY_SCHEME_ECMQV_Unmarshal()
2344 BYTE** buffer, in TPMS_SIG_SCHEME_RSASSA_Marshal() argument
2346 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SIG_SCHEME_RSASSA_Marshal()
2350 BYTE** buffer, in TPMS_SIG_SCHEME_RSASSA_Unmarshal() argument
2352 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SIG_SCHEME_RSASSA_Unmarshal()
2356 BYTE** buffer, in TPMS_ENC_SCHEME_OAEP_Marshal() argument
2358 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_ENC_SCHEME_OAEP_Marshal()
2362 BYTE** buffer, in TPMS_ENC_SCHEME_OAEP_Unmarshal() argument
2364 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_ENC_SCHEME_OAEP_Unmarshal()
2367 UINT16 TPMS_EMPTY_Marshal(TPMS_EMPTY* source, BYTE** buffer, INT32* size) { in TPMS_EMPTY_Marshal() argument
2372 TPM_RC TPMS_EMPTY_Unmarshal(TPMS_EMPTY* target, BYTE** buffer, INT32* size) { in TPMS_EMPTY_Unmarshal() argument
2380 BYTE** buffer, in TPMS_ENC_SCHEME_RSAES_Marshal() argument
2382 return TPMS_EMPTY_Marshal(source, buffer, size); in TPMS_ENC_SCHEME_RSAES_Marshal()
2386 BYTE** buffer, in TPMS_ENC_SCHEME_RSAES_Unmarshal() argument
2388 return TPMS_EMPTY_Unmarshal(target, buffer, size); in TPMS_ENC_SCHEME_RSAES_Unmarshal()
2392 BYTE** buffer, in TPMS_SIG_SCHEME_ECDSA_Marshal() argument
2394 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SIG_SCHEME_ECDSA_Marshal()
2398 BYTE** buffer, in TPMS_SIG_SCHEME_ECDSA_Unmarshal() argument
2400 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SIG_SCHEME_ECDSA_Unmarshal()
2404 BYTE** buffer, in TPMU_ASYM_SCHEME_Marshal() argument
2411 buffer, size); in TPMU_ASYM_SCHEME_Marshal()
2416 (TPMS_KEY_SCHEME_ECMQV*)&source->ecmqv, buffer, size); in TPMU_ASYM_SCHEME_Marshal()
2421 (TPMS_SIG_SCHEME_RSASSA*)&source->rsassa, buffer, size); in TPMU_ASYM_SCHEME_Marshal()
2426 (TPMS_SIG_SCHEME_RSAPSS*)&source->rsapss, buffer, size); in TPMU_ASYM_SCHEME_Marshal()
2431 (TPMS_SIG_SCHEME_ECDSA*)&source->ecdsa, buffer, size); in TPMU_ASYM_SCHEME_Marshal()
2436 (TPMS_SIG_SCHEME_ECDAA*)&source->ecdaa, buffer, size); in TPMU_ASYM_SCHEME_Marshal()
2441 buffer, size); in TPMU_ASYM_SCHEME_Marshal()
2446 (TPMS_SIG_SCHEME_ECSCHNORR*)&source->ecschnorr, buffer, size); in TPMU_ASYM_SCHEME_Marshal()
2451 (TPMS_ENC_SCHEME_RSAES*)&source->rsaes, buffer, size); in TPMU_ASYM_SCHEME_Marshal()
2456 buffer, size); in TPMU_ASYM_SCHEME_Marshal()
2467 BYTE** buffer, in TPMU_ASYM_SCHEME_Unmarshal() argument
2474 (TPMS_KEY_SCHEME_ECDH*)&target->ecdh, buffer, size); in TPMU_ASYM_SCHEME_Unmarshal()
2479 (TPMS_KEY_SCHEME_ECMQV*)&target->ecmqv, buffer, size); in TPMU_ASYM_SCHEME_Unmarshal()
2484 (TPMS_SIG_SCHEME_RSASSA*)&target->rsassa, buffer, size); in TPMU_ASYM_SCHEME_Unmarshal()
2489 (TPMS_SIG_SCHEME_RSAPSS*)&target->rsapss, buffer, size); in TPMU_ASYM_SCHEME_Unmarshal()
2494 (TPMS_SIG_SCHEME_ECDSA*)&target->ecdsa, buffer, size); in TPMU_ASYM_SCHEME_Unmarshal()
2499 (TPMS_SIG_SCHEME_ECDAA*)&target->ecdaa, buffer, size); in TPMU_ASYM_SCHEME_Unmarshal()
2504 buffer, size); in TPMU_ASYM_SCHEME_Unmarshal()
2509 (TPMS_SIG_SCHEME_ECSCHNORR*)&target->ecschnorr, buffer, size); in TPMU_ASYM_SCHEME_Unmarshal()
2514 (TPMS_ENC_SCHEME_RSAES*)&target->rsaes, buffer, size); in TPMU_ASYM_SCHEME_Unmarshal()
2519 (TPMS_ENC_SCHEME_OAEP*)&target->oaep, buffer, size); in TPMU_ASYM_SCHEME_Unmarshal()
2530 BYTE** buffer, in TPMT_RSA_SCHEME_Marshal() argument
2533 total_size += TPMI_ALG_RSA_SCHEME_Marshal(&source->scheme, buffer, size); in TPMT_RSA_SCHEME_Marshal()
2535 TPMU_ASYM_SCHEME_Marshal(&source->details, buffer, size, source->scheme); in TPMT_RSA_SCHEME_Marshal()
2540 BYTE** buffer, in TPMT_RSA_SCHEME_Unmarshal() argument
2543 result = TPMI_ALG_RSA_SCHEME_Unmarshal(&target->scheme, buffer, size, TRUE); in TPMT_RSA_SCHEME_Unmarshal()
2547 result = TPMU_ASYM_SCHEME_Unmarshal(&target->details, buffer, size, in TPMT_RSA_SCHEME_Unmarshal()
2556 BYTE** buffer, in TPMI_RSA_KEY_BITS_Marshal() argument
2558 return uint16_t_Marshal(source, buffer, size); in TPMI_RSA_KEY_BITS_Marshal()
2562 BYTE** buffer, in TPMI_RSA_KEY_BITS_Unmarshal() argument
2569 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_RSA_KEY_BITS_Unmarshal()
2586 BYTE** buffer, in TPMS_RSA_PARMS_Marshal() argument
2589 total_size += TPMT_SYM_DEF_OBJECT_Marshal(&source->symmetric, buffer, size); in TPMS_RSA_PARMS_Marshal()
2590 total_size += TPMT_RSA_SCHEME_Marshal(&source->scheme, buffer, size); in TPMS_RSA_PARMS_Marshal()
2591 total_size += TPMI_RSA_KEY_BITS_Marshal(&source->keyBits, buffer, size); in TPMS_RSA_PARMS_Marshal()
2592 total_size += UINT32_Marshal(&source->exponent, buffer, size); in TPMS_RSA_PARMS_Marshal()
2597 BYTE** buffer, in TPMS_RSA_PARMS_Unmarshal() argument
2600 result = TPMT_SYM_DEF_OBJECT_Unmarshal(&target->symmetric, buffer, size); in TPMS_RSA_PARMS_Unmarshal()
2604 result = TPMT_RSA_SCHEME_Unmarshal(&target->scheme, buffer, size); in TPMS_RSA_PARMS_Unmarshal()
2608 result = TPMI_RSA_KEY_BITS_Unmarshal(&target->keyBits, buffer, size); in TPMS_RSA_PARMS_Unmarshal()
2612 result = UINT32_Unmarshal(&target->exponent, buffer, size); in TPMS_RSA_PARMS_Unmarshal()
2620 BYTE** buffer, in TPMS_SYMCIPHER_PARMS_Marshal() argument
2623 total_size += TPMT_SYM_DEF_OBJECT_Marshal(&source->sym, buffer, size); in TPMS_SYMCIPHER_PARMS_Marshal()
2628 BYTE** buffer, in TPMS_SYMCIPHER_PARMS_Unmarshal() argument
2631 result = TPMT_SYM_DEF_OBJECT_Unmarshal(&target->sym, buffer, size); in TPMS_SYMCIPHER_PARMS_Unmarshal()
2639 BYTE** buffer, in TPMI_ALG_ASYM_SCHEME_Marshal() argument
2641 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_ASYM_SCHEME_Marshal()
2645 BYTE** buffer, in TPMI_ALG_ASYM_SCHEME_Unmarshal() argument
2650 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_ASYM_SCHEME_Unmarshal()
2698 BYTE** buffer, in TPMT_ASYM_SCHEME_Marshal() argument
2701 total_size += TPMI_ALG_ASYM_SCHEME_Marshal(&source->scheme, buffer, size); in TPMT_ASYM_SCHEME_Marshal()
2703 TPMU_ASYM_SCHEME_Marshal(&source->details, buffer, size, source->scheme); in TPMT_ASYM_SCHEME_Marshal()
2708 BYTE** buffer, in TPMT_ASYM_SCHEME_Unmarshal() argument
2711 result = TPMI_ALG_ASYM_SCHEME_Unmarshal(&target->scheme, buffer, size, TRUE); in TPMT_ASYM_SCHEME_Unmarshal()
2715 result = TPMU_ASYM_SCHEME_Unmarshal(&target->details, buffer, size, in TPMT_ASYM_SCHEME_Unmarshal()
2724 BYTE** buffer, in TPMS_ASYM_PARMS_Marshal() argument
2727 total_size += TPMT_SYM_DEF_OBJECT_Marshal(&source->symmetric, buffer, size); in TPMS_ASYM_PARMS_Marshal()
2728 total_size += TPMT_ASYM_SCHEME_Marshal(&source->scheme, buffer, size); in TPMS_ASYM_PARMS_Marshal()
2733 BYTE** buffer, in TPMS_ASYM_PARMS_Unmarshal() argument
2736 result = TPMT_SYM_DEF_OBJECT_Unmarshal(&target->symmetric, buffer, size); in TPMS_ASYM_PARMS_Unmarshal()
2740 result = TPMT_ASYM_SCHEME_Unmarshal(&target->scheme, buffer, size); in TPMS_ASYM_PARMS_Unmarshal()
2747 UINT16 TPMI_ALG_KDF_Marshal(TPMI_ALG_KDF* source, BYTE** buffer, INT32* size) { in TPMI_ALG_KDF_Marshal() argument
2748 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_KDF_Marshal()
2752 BYTE** buffer, in TPMI_ALG_KDF_Unmarshal() argument
2757 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_KDF_Unmarshal()
2787 BYTE** buffer, in TPMS_SCHEME_KDF1_SP800_108_Marshal() argument
2789 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SCHEME_KDF1_SP800_108_Marshal()
2793 BYTE** buffer, in TPMS_SCHEME_KDF1_SP800_108_Unmarshal() argument
2795 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SCHEME_KDF1_SP800_108_Unmarshal()
2799 BYTE** buffer, in TPMS_SCHEME_KDF2_Marshal() argument
2801 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SCHEME_KDF2_Marshal()
2805 BYTE** buffer, in TPMS_SCHEME_KDF2_Unmarshal() argument
2807 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SCHEME_KDF2_Unmarshal()
2811 BYTE** buffer, in TPMS_SCHEME_KDF1_SP800_56A_Marshal() argument
2813 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SCHEME_KDF1_SP800_56A_Marshal()
2817 BYTE** buffer, in TPMS_SCHEME_KDF1_SP800_56A_Unmarshal() argument
2819 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SCHEME_KDF1_SP800_56A_Unmarshal()
2823 BYTE** buffer, in TPMS_SCHEME_MGF1_Marshal() argument
2825 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SCHEME_MGF1_Marshal()
2829 BYTE** buffer, in TPMS_SCHEME_MGF1_Unmarshal() argument
2831 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SCHEME_MGF1_Unmarshal()
2835 BYTE** buffer, in TPMU_KDF_SCHEME_Marshal() argument
2841 return TPMS_SCHEME_MGF1_Marshal((TPMS_SCHEME_MGF1*)&source->mgf1, buffer, in TPMU_KDF_SCHEME_Marshal()
2847 (TPMS_SCHEME_KDF1_SP800_56A*)&source->kdf1_sp800_56a, buffer, size); in TPMU_KDF_SCHEME_Marshal()
2851 return TPMS_SCHEME_KDF2_Marshal((TPMS_SCHEME_KDF2*)&source->kdf2, buffer, in TPMU_KDF_SCHEME_Marshal()
2857 (TPMS_SCHEME_KDF1_SP800_108*)&source->kdf1_sp800_108, buffer, size); in TPMU_KDF_SCHEME_Marshal()
2868 BYTE** buffer, in TPMU_KDF_SCHEME_Unmarshal() argument
2875 buffer, size); in TPMU_KDF_SCHEME_Unmarshal()
2880 (TPMS_SCHEME_KDF1_SP800_56A*)&target->kdf1_sp800_56a, buffer, size); in TPMU_KDF_SCHEME_Unmarshal()
2885 buffer, size); in TPMU_KDF_SCHEME_Unmarshal()
2890 (TPMS_SCHEME_KDF1_SP800_108*)&target->kdf1_sp800_108, buffer, size); in TPMU_KDF_SCHEME_Unmarshal()
2901 BYTE** buffer, in TPMT_KDF_SCHEME_Marshal() argument
2904 total_size += TPMI_ALG_KDF_Marshal(&source->scheme, buffer, size); in TPMT_KDF_SCHEME_Marshal()
2906 TPMU_KDF_SCHEME_Marshal(&source->details, buffer, size, source->scheme); in TPMT_KDF_SCHEME_Marshal()
2911 BYTE** buffer, in TPMT_KDF_SCHEME_Unmarshal() argument
2914 result = TPMI_ALG_KDF_Unmarshal(&target->scheme, buffer, size, TRUE); in TPMT_KDF_SCHEME_Unmarshal()
2919 TPMU_KDF_SCHEME_Unmarshal(&target->details, buffer, size, target->scheme); in TPMT_KDF_SCHEME_Unmarshal()
2927 BYTE** buffer, in TPMI_ALG_ECC_SCHEME_Marshal() argument
2929 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_ECC_SCHEME_Marshal()
2933 BYTE** buffer, in TPMI_ALG_ECC_SCHEME_Unmarshal() argument
2938 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_ECC_SCHEME_Unmarshal()
2974 BYTE** buffer, in TPMT_ECC_SCHEME_Marshal() argument
2977 total_size += TPMI_ALG_ECC_SCHEME_Marshal(&source->scheme, buffer, size); in TPMT_ECC_SCHEME_Marshal()
2979 TPMU_ASYM_SCHEME_Marshal(&source->details, buffer, size, source->scheme); in TPMT_ECC_SCHEME_Marshal()
2984 BYTE** buffer, in TPMT_ECC_SCHEME_Unmarshal() argument
2987 result = TPMI_ALG_ECC_SCHEME_Unmarshal(&target->scheme, buffer, size, TRUE); in TPMT_ECC_SCHEME_Unmarshal()
2991 result = TPMU_ASYM_SCHEME_Unmarshal(&target->details, buffer, size, in TPMT_ECC_SCHEME_Unmarshal()
3000 BYTE** buffer, in TPMI_ECC_CURVE_Marshal() argument
3002 return uint16_t_Marshal(source, buffer, size); in TPMI_ECC_CURVE_Marshal()
3006 BYTE** buffer, in TPMI_ECC_CURVE_Unmarshal() argument
3013 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ECC_CURVE_Unmarshal()
3030 BYTE** buffer, in TPMS_ECC_PARMS_Marshal() argument
3033 total_size += TPMT_SYM_DEF_OBJECT_Marshal(&source->symmetric, buffer, size); in TPMS_ECC_PARMS_Marshal()
3034 total_size += TPMT_ECC_SCHEME_Marshal(&source->scheme, buffer, size); in TPMS_ECC_PARMS_Marshal()
3035 total_size += TPMI_ECC_CURVE_Marshal(&source->curveID, buffer, size); in TPMS_ECC_PARMS_Marshal()
3036 total_size += TPMT_KDF_SCHEME_Marshal(&source->kdf, buffer, size); in TPMS_ECC_PARMS_Marshal()
3041 BYTE** buffer, in TPMS_ECC_PARMS_Unmarshal() argument
3044 result = TPMT_SYM_DEF_OBJECT_Unmarshal(&target->symmetric, buffer, size); in TPMS_ECC_PARMS_Unmarshal()
3048 result = TPMT_ECC_SCHEME_Unmarshal(&target->scheme, buffer, size); in TPMS_ECC_PARMS_Unmarshal()
3052 result = TPMI_ECC_CURVE_Unmarshal(&target->curveID, buffer, size); in TPMS_ECC_PARMS_Unmarshal()
3056 result = TPMT_KDF_SCHEME_Unmarshal(&target->kdf, buffer, size); in TPMS_ECC_PARMS_Unmarshal()
3064 BYTE** buffer, in TPMI_ALG_KEYEDHASH_SCHEME_Marshal() argument
3066 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_KEYEDHASH_SCHEME_Marshal()
3070 BYTE** buffer, in TPMI_ALG_KEYEDHASH_SCHEME_Unmarshal() argument
3075 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_KEYEDHASH_SCHEME_Unmarshal()
3099 BYTE** buffer, in TPMS_SCHEME_HMAC_Marshal() argument
3101 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SCHEME_HMAC_Marshal()
3105 BYTE** buffer, in TPMS_SCHEME_HMAC_Unmarshal() argument
3107 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SCHEME_HMAC_Unmarshal()
3111 BYTE** buffer, in TPMS_SCHEME_XOR_Marshal() argument
3114 total_size += TPMI_ALG_HASH_Marshal(&source->hashAlg, buffer, size); in TPMS_SCHEME_XOR_Marshal()
3115 total_size += TPMI_ALG_KDF_Marshal(&source->kdf, buffer, size); in TPMS_SCHEME_XOR_Marshal()
3120 BYTE** buffer, in TPMS_SCHEME_XOR_Unmarshal() argument
3123 result = TPMI_ALG_HASH_Unmarshal(&target->hashAlg, buffer, size, TRUE); in TPMS_SCHEME_XOR_Unmarshal()
3127 result = TPMI_ALG_KDF_Unmarshal(&target->kdf, buffer, size, FALSE); in TPMS_SCHEME_XOR_Unmarshal()
3135 BYTE** buffer, in TPMU_SCHEME_KEYEDHASH_Marshal() argument
3141 return TPMS_SCHEME_HMAC_Marshal((TPMS_SCHEME_HMAC*)&source->hmac, buffer, in TPMU_SCHEME_KEYEDHASH_Marshal()
3146 return TPMS_SCHEME_XOR_Marshal((TPMS_SCHEME_XOR*)&source->xor_, buffer, in TPMU_SCHEME_KEYEDHASH_Marshal()
3158 BYTE** buffer, in TPMU_SCHEME_KEYEDHASH_Unmarshal() argument
3165 buffer, size); in TPMU_SCHEME_KEYEDHASH_Unmarshal()
3169 return TPMS_SCHEME_XOR_Unmarshal((TPMS_SCHEME_XOR*)&target->xor_, buffer, in TPMU_SCHEME_KEYEDHASH_Unmarshal()
3181 BYTE** buffer, in TPMT_KEYEDHASH_SCHEME_Marshal() argument
3185 TPMI_ALG_KEYEDHASH_SCHEME_Marshal(&source->scheme, buffer, size); in TPMT_KEYEDHASH_SCHEME_Marshal()
3186 total_size += TPMU_SCHEME_KEYEDHASH_Marshal(&source->details, buffer, size, in TPMT_KEYEDHASH_SCHEME_Marshal()
3192 BYTE** buffer, in TPMT_KEYEDHASH_SCHEME_Unmarshal() argument
3196 TPMI_ALG_KEYEDHASH_SCHEME_Unmarshal(&target->scheme, buffer, size, TRUE); in TPMT_KEYEDHASH_SCHEME_Unmarshal()
3200 result = TPMU_SCHEME_KEYEDHASH_Unmarshal(&target->details, buffer, size, in TPMT_KEYEDHASH_SCHEME_Unmarshal()
3209 BYTE** buffer, in TPMS_KEYEDHASH_PARMS_Marshal() argument
3212 total_size += TPMT_KEYEDHASH_SCHEME_Marshal(&source->scheme, buffer, size); in TPMS_KEYEDHASH_PARMS_Marshal()
3217 BYTE** buffer, in TPMS_KEYEDHASH_PARMS_Unmarshal() argument
3220 result = TPMT_KEYEDHASH_SCHEME_Unmarshal(&target->scheme, buffer, size); in TPMS_KEYEDHASH_PARMS_Unmarshal()
3228 BYTE** buffer, in TPMU_PUBLIC_PARMS_Marshal() argument
3235 (TPMS_KEYEDHASH_PARMS*)&source->keyedHashDetail, buffer, size); in TPMU_PUBLIC_PARMS_Marshal()
3240 (TPMS_SYMCIPHER_PARMS*)&source->symDetail, buffer, size); in TPMU_PUBLIC_PARMS_Marshal()
3244 return TPMS_RSA_PARMS_Marshal((TPMS_RSA_PARMS*)&source->rsaDetail, buffer, in TPMU_PUBLIC_PARMS_Marshal()
3249 return TPMS_ECC_PARMS_Marshal((TPMS_ECC_PARMS*)&source->eccDetail, buffer, in TPMU_PUBLIC_PARMS_Marshal()
3257 BYTE** buffer, in TPMU_PUBLIC_PARMS_Unmarshal() argument
3264 (TPMS_KEYEDHASH_PARMS*)&target->keyedHashDetail, buffer, size); in TPMU_PUBLIC_PARMS_Unmarshal()
3269 (TPMS_SYMCIPHER_PARMS*)&target->symDetail, buffer, size); in TPMU_PUBLIC_PARMS_Unmarshal()
3274 buffer, size); in TPMU_PUBLIC_PARMS_Unmarshal()
3279 buffer, size); in TPMU_PUBLIC_PARMS_Unmarshal()
3285 UINT16 TPMT_PUBLIC_Marshal(TPMT_PUBLIC* source, BYTE** buffer, INT32* size) { in TPMT_PUBLIC_Marshal() argument
3287 total_size += TPMI_ALG_PUBLIC_Marshal(&source->type, buffer, size); in TPMT_PUBLIC_Marshal()
3288 total_size += TPMI_ALG_HASH_Marshal(&source->nameAlg, buffer, size); in TPMT_PUBLIC_Marshal()
3289 total_size += TPMA_OBJECT_Marshal(&source->objectAttributes, buffer, size); in TPMT_PUBLIC_Marshal()
3290 total_size += TPM2B_DIGEST_Marshal(&source->authPolicy, buffer, size); in TPMT_PUBLIC_Marshal()
3291 total_size += TPMU_PUBLIC_PARMS_Marshal(&source->parameters, buffer, size, in TPMT_PUBLIC_Marshal()
3294 TPMU_PUBLIC_ID_Marshal(&source->unique, buffer, size, source->type); in TPMT_PUBLIC_Marshal()
3298 TPM_RC TPMT_PUBLIC_Unmarshal(TPMT_PUBLIC* target, BYTE** buffer, INT32* size) { in TPMT_PUBLIC_Unmarshal() argument
3300 result = TPMI_ALG_PUBLIC_Unmarshal(&target->type, buffer, size); in TPMT_PUBLIC_Unmarshal()
3304 result = TPMI_ALG_HASH_Unmarshal(&target->nameAlg, buffer, size, TRUE); in TPMT_PUBLIC_Unmarshal()
3308 result = TPMA_OBJECT_Unmarshal(&target->objectAttributes, buffer, size); in TPMT_PUBLIC_Unmarshal()
3312 result = TPM2B_DIGEST_Unmarshal(&target->authPolicy, buffer, size); in TPMT_PUBLIC_Unmarshal()
3316 result = TPMU_PUBLIC_PARMS_Unmarshal(&target->parameters, buffer, size, in TPMT_PUBLIC_Unmarshal()
3322 TPMU_PUBLIC_ID_Unmarshal(&target->unique, buffer, size, target->type); in TPMT_PUBLIC_Unmarshal()
3329 UINT16 TPM2B_PUBLIC_Marshal(TPM2B_PUBLIC* source, BYTE** buffer, INT32* size) { in TPM2B_PUBLIC_Marshal() argument
3331 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_PUBLIC_Marshal()
3332 total_size += TPMT_PUBLIC_Marshal(&source->t.publicArea, buffer, size); in TPM2B_PUBLIC_Marshal()
3334 BYTE* size_location = *buffer - total_size; in TPM2B_PUBLIC_Marshal()
3343 BYTE** buffer, in TPM2B_PUBLIC_Unmarshal() argument
3348 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_PUBLIC_Unmarshal()
3355 result = TPMT_PUBLIC_Unmarshal(&target->t.publicArea, buffer, size); in TPM2B_PUBLIC_Unmarshal()
3367 BYTE** buffer, in TPM2B_SENSITIVE_DATA_Marshal() argument
3371 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_SENSITIVE_DATA_Marshal()
3373 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_SENSITIVE_DATA_Marshal()
3379 BYTE** buffer, in TPM2B_SENSITIVE_DATA_Unmarshal() argument
3383 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_SENSITIVE_DATA_Unmarshal()
3394 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_SENSITIVE_DATA_Unmarshal()
3403 BYTE** buffer, in TPM2B_SYM_KEY_Marshal() argument
3407 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_SYM_KEY_Marshal()
3409 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_SYM_KEY_Marshal()
3415 BYTE** buffer, in TPM2B_SYM_KEY_Unmarshal() argument
3419 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_SYM_KEY_Unmarshal()
3430 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_SYM_KEY_Unmarshal()
3439 BYTE** buffer, in TPMU_SENSITIVE_COMPOSITE_Marshal() argument
3446 buffer, size); in TPMU_SENSITIVE_COMPOSITE_Marshal()
3451 buffer, size); in TPMU_SENSITIVE_COMPOSITE_Marshal()
3456 buffer, size); in TPMU_SENSITIVE_COMPOSITE_Marshal()
3460 return TPM2B_SYM_KEY_Marshal((TPM2B_SYM_KEY*)&source->sym, buffer, size); in TPMU_SENSITIVE_COMPOSITE_Marshal()
3467 BYTE** buffer, in TPMU_SENSITIVE_COMPOSITE_Unmarshal() argument
3474 (TPM2B_PRIVATE_KEY_RSA*)&target->rsa, buffer, size); in TPMU_SENSITIVE_COMPOSITE_Unmarshal()
3479 buffer, size); in TPMU_SENSITIVE_COMPOSITE_Unmarshal()
3484 (TPM2B_SENSITIVE_DATA*)&target->bits, buffer, size); in TPMU_SENSITIVE_COMPOSITE_Unmarshal()
3488 return TPM2B_SYM_KEY_Unmarshal((TPM2B_SYM_KEY*)&target->sym, buffer, in TPMU_SENSITIVE_COMPOSITE_Unmarshal()
3496 BYTE** buffer, in TPMT_SENSITIVE_Marshal() argument
3499 total_size += TPMI_ALG_PUBLIC_Marshal(&source->sensitiveType, buffer, size); in TPMT_SENSITIVE_Marshal()
3500 total_size += TPM2B_AUTH_Marshal(&source->authValue, buffer, size); in TPMT_SENSITIVE_Marshal()
3501 total_size += TPM2B_DIGEST_Marshal(&source->seedValue, buffer, size); in TPMT_SENSITIVE_Marshal()
3502 total_size += TPMU_SENSITIVE_COMPOSITE_Marshal(&source->sensitive, buffer, in TPMT_SENSITIVE_Marshal()
3508 BYTE** buffer, in TPMT_SENSITIVE_Unmarshal() argument
3511 result = TPMI_ALG_PUBLIC_Unmarshal(&target->sensitiveType, buffer, size); in TPMT_SENSITIVE_Unmarshal()
3515 result = TPM2B_AUTH_Unmarshal(&target->authValue, buffer, size); in TPMT_SENSITIVE_Unmarshal()
3519 result = TPM2B_DIGEST_Unmarshal(&target->seedValue, buffer, size); in TPMT_SENSITIVE_Unmarshal()
3523 result = TPMU_SENSITIVE_COMPOSITE_Unmarshal(&target->sensitive, buffer, size, in TPMT_SENSITIVE_Unmarshal()
3532 BYTE** buffer, in TPM2B_SENSITIVE_Marshal() argument
3535 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_SENSITIVE_Marshal()
3536 total_size += TPMT_SENSITIVE_Marshal(&source->t.sensitiveArea, buffer, size); in TPM2B_SENSITIVE_Marshal()
3541 BYTE** buffer, in TPM2B_SENSITIVE_Unmarshal() argument
3544 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_SENSITIVE_Unmarshal()
3551 result = TPMT_SENSITIVE_Unmarshal(&target->t.sensitiveArea, buffer, size); in TPM2B_SENSITIVE_Unmarshal()
3559 BYTE** buffer, in TPMS_SENSITIVE_CREATE_Marshal() argument
3562 total_size += TPM2B_AUTH_Marshal(&source->userAuth, buffer, size); in TPMS_SENSITIVE_CREATE_Marshal()
3563 total_size += TPM2B_SENSITIVE_DATA_Marshal(&source->data, buffer, size); in TPMS_SENSITIVE_CREATE_Marshal()
3568 BYTE** buffer, in TPMS_SENSITIVE_CREATE_Unmarshal() argument
3571 result = TPM2B_AUTH_Unmarshal(&target->userAuth, buffer, size); in TPMS_SENSITIVE_CREATE_Unmarshal()
3575 result = TPM2B_SENSITIVE_DATA_Unmarshal(&target->data, buffer, size); in TPMS_SENSITIVE_CREATE_Unmarshal()
3583 BYTE** buffer, in TPM2B_SENSITIVE_CREATE_Marshal() argument
3586 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_SENSITIVE_CREATE_Marshal()
3588 TPMS_SENSITIVE_CREATE_Marshal(&source->t.sensitive, buffer, size); in TPM2B_SENSITIVE_CREATE_Marshal()
3590 BYTE* size_location = *buffer - total_size; in TPM2B_SENSITIVE_CREATE_Marshal()
3599 BYTE** buffer, in TPM2B_SENSITIVE_CREATE_Unmarshal() argument
3604 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_SENSITIVE_CREATE_Unmarshal()
3611 result = TPMS_SENSITIVE_CREATE_Unmarshal(&target->t.sensitive, buffer, size); in TPM2B_SENSITIVE_CREATE_Unmarshal()
3623 BYTE** buffer, in TPM2B_TIMEOUT_Marshal() argument
3627 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_TIMEOUT_Marshal()
3629 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_TIMEOUT_Marshal()
3635 BYTE** buffer, in TPM2B_TIMEOUT_Unmarshal() argument
3639 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_TIMEOUT_Unmarshal()
3650 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_TIMEOUT_Unmarshal()
3659 BYTE** buffer, in TPMA_ALGORITHM_Marshal() argument
3661 return uint32_t_Marshal((uint32_t*)source, buffer, size); in TPMA_ALGORITHM_Marshal()
3665 BYTE** buffer, in TPMA_ALGORITHM_Unmarshal() argument
3668 result = uint32_t_Unmarshal((uint32_t*)target, buffer, size); in TPMA_ALGORITHM_Unmarshal()
3681 UINT16 TPMA_CC_Marshal(TPMA_CC* source, BYTE** buffer, INT32* size) { in TPMA_CC_Marshal() argument
3682 return uint32_t_Marshal((uint32_t*)source, buffer, size); in TPMA_CC_Marshal()
3685 TPM_RC TPMA_CC_Unmarshal(TPMA_CC* target, BYTE** buffer, INT32* size) { in TPMA_CC_Unmarshal() argument
3687 result = uint32_t_Unmarshal((uint32_t*)target, buffer, size); in TPMA_CC_Unmarshal()
3697 UINT16 TPMA_MEMORY_Marshal(TPMA_MEMORY* source, BYTE** buffer, INT32* size) { in TPMA_MEMORY_Marshal() argument
3698 return uint32_t_Marshal((uint32_t*)source, buffer, size); in TPMA_MEMORY_Marshal()
3701 TPM_RC TPMA_MEMORY_Unmarshal(TPMA_MEMORY* target, BYTE** buffer, INT32* size) { in TPMA_MEMORY_Unmarshal() argument
3703 result = uint32_t_Unmarshal((uint32_t*)target, buffer, size); in TPMA_MEMORY_Unmarshal()
3714 BYTE** buffer, in TPMA_PERMANENT_Marshal() argument
3716 return uint32_t_Marshal((uint32_t*)source, buffer, size); in TPMA_PERMANENT_Marshal()
3720 BYTE** buffer, in TPMA_PERMANENT_Unmarshal() argument
3723 result = uint32_t_Unmarshal((uint32_t*)target, buffer, size); in TPMA_PERMANENT_Unmarshal()
3736 UINT16 TPMA_SESSION_Marshal(TPMA_SESSION* source, BYTE** buffer, INT32* size) { in TPMA_SESSION_Marshal() argument
3737 return uint8_t_Marshal((uint8_t*)source, buffer, size); in TPMA_SESSION_Marshal()
3741 BYTE** buffer, in TPMA_SESSION_Unmarshal() argument
3744 result = uint8_t_Unmarshal((uint8_t*)target, buffer, size); in TPMA_SESSION_Unmarshal()
3755 BYTE** buffer, in TPMA_STARTUP_CLEAR_Marshal() argument
3757 return uint32_t_Marshal((uint32_t*)source, buffer, size); in TPMA_STARTUP_CLEAR_Marshal()
3761 BYTE** buffer, in TPMA_STARTUP_CLEAR_Unmarshal() argument
3764 result = uint32_t_Unmarshal((uint32_t*)target, buffer, size); in TPMA_STARTUP_CLEAR_Unmarshal()
3775 BYTE** buffer, in TPMI_ALG_ASYM_Marshal() argument
3777 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_ASYM_Marshal()
3781 BYTE** buffer, in TPMI_ALG_ASYM_Unmarshal() argument
3786 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_ASYM_Unmarshal()
3810 BYTE** buffer, in TPMI_ALG_RSA_DECRYPT_Marshal() argument
3812 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_RSA_DECRYPT_Marshal()
3816 BYTE** buffer, in TPMI_ALG_RSA_DECRYPT_Unmarshal() argument
3821 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_RSA_DECRYPT_Unmarshal()
3845 BYTE** buffer, in TPMI_ALG_SIG_SCHEME_Marshal() argument
3847 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_SIG_SCHEME_Marshal()
3851 BYTE** buffer, in TPMI_ALG_SIG_SCHEME_Unmarshal() argument
3856 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_SIG_SCHEME_Unmarshal()
3894 UINT16 TPMI_ALG_SYM_Marshal(TPMI_ALG_SYM* source, BYTE** buffer, INT32* size) { in TPMI_ALG_SYM_Marshal() argument
3895 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_SYM_Marshal()
3899 BYTE** buffer, in TPMI_ALG_SYM_Unmarshal() argument
3904 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_SYM_Unmarshal()
3934 BYTE** buffer, in TPMI_DH_CONTEXT_Marshal() argument
3936 return uint32_t_Marshal(source, buffer, size); in TPMI_DH_CONTEXT_Marshal()
3940 BYTE** buffer, in TPMI_DH_CONTEXT_Unmarshal() argument
3944 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_DH_CONTEXT_Unmarshal()
3964 BYTE** buffer, in TPMI_DH_ENTITY_Marshal() argument
3966 return uint32_t_Marshal(source, buffer, size); in TPMI_DH_ENTITY_Marshal()
3970 BYTE** buffer, in TPMI_DH_ENTITY_Unmarshal() argument
3975 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_DH_ENTITY_Unmarshal()
4012 BYTE** buffer, in TPMI_DH_OBJECT_Marshal() argument
4014 return uint32_t_Marshal(source, buffer, size); in TPMI_DH_OBJECT_Marshal()
4018 BYTE** buffer, in TPMI_DH_OBJECT_Unmarshal() argument
4023 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_DH_OBJECT_Unmarshal()
4042 UINT16 TPMI_DH_PCR_Marshal(TPMI_DH_PCR* source, BYTE** buffer, INT32* size) { in TPMI_DH_PCR_Marshal() argument
4043 return uint32_t_Marshal(source, buffer, size); in TPMI_DH_PCR_Marshal()
4047 BYTE** buffer, in TPMI_DH_PCR_Unmarshal() argument
4052 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_DH_PCR_Unmarshal()
4069 BYTE** buffer, in TPMI_DH_PERSISTENT_Marshal() argument
4071 return uint32_t_Marshal(source, buffer, size); in TPMI_DH_PERSISTENT_Marshal()
4075 BYTE** buffer, in TPMI_DH_PERSISTENT_Unmarshal() argument
4079 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_DH_PERSISTENT_Unmarshal()
4093 BYTE** buffer, in TPMI_ECC_KEY_EXCHANGE_Marshal() argument
4095 return uint16_t_Marshal(source, buffer, size); in TPMI_ECC_KEY_EXCHANGE_Marshal()
4099 BYTE** buffer, in TPMI_ECC_KEY_EXCHANGE_Unmarshal() argument
4104 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ECC_KEY_EXCHANGE_Unmarshal()
4131 BYTE** buffer, in TPMI_RH_CLEAR_Marshal() argument
4133 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_CLEAR_Marshal()
4137 BYTE** buffer, in TPMI_RH_CLEAR_Unmarshal() argument
4141 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_CLEAR_Unmarshal()
4158 BYTE** buffer, in TPMI_RH_ENABLES_Marshal() argument
4160 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_ENABLES_Marshal()
4164 BYTE** buffer, in TPMI_RH_ENABLES_Unmarshal() argument
4169 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_ENABLES_Unmarshal()
4191 BYTE** buffer, in TPMI_RH_ENDORSEMENT_Marshal() argument
4193 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_ENDORSEMENT_Marshal()
4197 BYTE** buffer, in TPMI_RH_ENDORSEMENT_Unmarshal() argument
4202 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_ENDORSEMENT_Unmarshal()
4221 BYTE** buffer, in TPMI_RH_HIERARCHY_Marshal() argument
4223 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_HIERARCHY_Marshal()
4227 BYTE** buffer, in TPMI_RH_HIERARCHY_Unmarshal() argument
4232 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_HIERARCHY_Unmarshal()
4253 BYTE** buffer, in TPMI_RH_HIERARCHY_AUTH_Marshal() argument
4255 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_HIERARCHY_AUTH_Marshal()
4259 BYTE** buffer, in TPMI_RH_HIERARCHY_AUTH_Unmarshal() argument
4263 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_HIERARCHY_AUTH_Unmarshal()
4282 BYTE** buffer, in TPMI_RH_LOCKOUT_Marshal() argument
4284 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_LOCKOUT_Marshal()
4288 BYTE** buffer, in TPMI_RH_LOCKOUT_Unmarshal() argument
4292 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_LOCKOUT_Unmarshal()
4308 BYTE** buffer, in TPMI_RH_NV_AUTH_Marshal() argument
4310 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_NV_AUTH_Marshal()
4314 BYTE** buffer, in TPMI_RH_NV_AUTH_Unmarshal() argument
4318 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_NV_AUTH_Unmarshal()
4338 BYTE** buffer, in TPMI_RH_OWNER_Marshal() argument
4340 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_OWNER_Marshal()
4344 BYTE** buffer, in TPMI_RH_OWNER_Unmarshal() argument
4349 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_OWNER_Unmarshal()
4368 BYTE** buffer, in TPMI_RH_PLATFORM_Marshal() argument
4370 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_PLATFORM_Marshal()
4374 BYTE** buffer, in TPMI_RH_PLATFORM_Unmarshal() argument
4378 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_PLATFORM_Unmarshal()
4394 BYTE** buffer, in TPMI_RH_PROVISION_Marshal() argument
4396 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_PROVISION_Marshal()
4400 BYTE** buffer, in TPMI_RH_PROVISION_Unmarshal() argument
4404 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_PROVISION_Unmarshal()
4421 BYTE** buffer, in TPMI_SH_AUTH_SESSION_Marshal() argument
4423 return uint32_t_Marshal(source, buffer, size); in TPMI_SH_AUTH_SESSION_Marshal()
4427 BYTE** buffer, in TPMI_SH_AUTH_SESSION_Unmarshal() argument
4432 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_SH_AUTH_SESSION_Unmarshal()
4451 UINT16 TPMI_SH_HMAC_Marshal(TPMI_SH_HMAC* source, BYTE** buffer, INT32* size) { in TPMI_SH_HMAC_Marshal() argument
4452 return uint32_t_Marshal(source, buffer, size); in TPMI_SH_HMAC_Marshal()
4456 BYTE** buffer, in TPMI_SH_HMAC_Unmarshal() argument
4460 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_SH_HMAC_Unmarshal()
4474 BYTE** buffer, in TPMI_SH_POLICY_Marshal() argument
4476 return uint32_t_Marshal(source, buffer, size); in TPMI_SH_POLICY_Marshal()
4480 BYTE** buffer, in TPMI_SH_POLICY_Unmarshal() argument
4484 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_SH_POLICY_Unmarshal()
4498 BYTE** buffer, in TPMI_ST_ATTEST_Marshal() argument
4500 return uint16_t_Marshal(source, buffer, size); in TPMI_ST_ATTEST_Marshal()
4504 BYTE** buffer, in TPMI_ST_ATTEST_Unmarshal() argument
4508 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ST_ATTEST_Unmarshal()
4530 BYTE** buffer, in TPMI_ST_COMMAND_TAG_Marshal() argument
4532 return uint16_t_Marshal(source, buffer, size); in TPMI_ST_COMMAND_TAG_Marshal()
4536 BYTE** buffer, in TPMI_ST_COMMAND_TAG_Unmarshal() argument
4540 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ST_COMMAND_TAG_Unmarshal()
4556 UINT16 TPMI_YES_NO_Marshal(TPMI_YES_NO* source, BYTE** buffer, INT32* size) { in TPMI_YES_NO_Marshal() argument
4557 return uint8_t_Marshal(source, buffer, size); in TPMI_YES_NO_Marshal()
4560 TPM_RC TPMI_YES_NO_Unmarshal(TPMI_YES_NO* target, BYTE** buffer, INT32* size) { in TPMI_YES_NO_Unmarshal() argument
4563 result = uint8_t_Unmarshal(target, buffer, size); in TPMI_YES_NO_Unmarshal()
4579 UINT16 TPML_ALG_Marshal(TPML_ALG* source, BYTE** buffer, INT32* size) { in TPML_ALG_Marshal() argument
4582 total_size += UINT32_Marshal(&source->count, buffer, size); in TPML_ALG_Marshal()
4584 total_size += TPM_ALG_ID_Marshal(&source->algorithms[i], buffer, size); in TPML_ALG_Marshal()
4589 TPM_RC TPML_ALG_Unmarshal(TPML_ALG* target, BYTE** buffer, INT32* size) { in TPML_ALG_Unmarshal() argument
4592 result = UINT32_Unmarshal(&target->count, buffer, size); in TPML_ALG_Unmarshal()
4600 result = TPM_ALG_ID_Unmarshal(&target->algorithms[i], buffer, size); in TPML_ALG_Unmarshal()
4609 BYTE** buffer, in TPMS_ALG_PROPERTY_Marshal() argument
4612 total_size += TPM_ALG_ID_Marshal(&source->alg, buffer, size); in TPMS_ALG_PROPERTY_Marshal()
4613 total_size += TPMA_ALGORITHM_Marshal(&source->algProperties, buffer, size); in TPMS_ALG_PROPERTY_Marshal()
4618 BYTE** buffer, in TPMS_ALG_PROPERTY_Unmarshal() argument
4621 result = TPM_ALG_ID_Unmarshal(&target->alg, buffer, size); in TPMS_ALG_PROPERTY_Unmarshal()
4625 result = TPMA_ALGORITHM_Unmarshal(&target->algProperties, buffer, size); in TPMS_ALG_PROPERTY_Unmarshal()
4633 BYTE** buffer, in TPML_ALG_PROPERTY_Marshal() argument
4637 total_size += UINT32_Marshal(&source->count, buffer, size); in TPML_ALG_PROPERTY_Marshal()
4640 TPMS_ALG_PROPERTY_Marshal(&source->algProperties[i], buffer, size); in TPML_ALG_PROPERTY_Marshal()
4646 BYTE** buffer, in TPML_ALG_PROPERTY_Unmarshal() argument
4650 result = UINT32_Unmarshal(&target->count, buffer, size); in TPML_ALG_PROPERTY_Unmarshal()
4659 TPMS_ALG_PROPERTY_Unmarshal(&target->algProperties[i], buffer, size); in TPML_ALG_PROPERTY_Unmarshal()
4667 UINT16 TPM_CC_Marshal(TPM_CC* source, BYTE** buffer, INT32* size) { in TPM_CC_Marshal() argument
4668 return uint32_t_Marshal(source, buffer, size); in TPM_CC_Marshal()
4671 TPM_RC TPM_CC_Unmarshal(TPM_CC* target, BYTE** buffer, INT32* size) { in TPM_CC_Unmarshal() argument
4673 result = uint32_t_Unmarshal(target, buffer, size); in TPM_CC_Unmarshal()
5240 UINT16 TPML_CC_Marshal(TPML_CC* source, BYTE** buffer, INT32* size) { in TPML_CC_Marshal() argument
5243 total_size += UINT32_Marshal(&source->count, buffer, size); in TPML_CC_Marshal()
5245 total_size += TPM_CC_Marshal(&source->commandCodes[i], buffer, size); in TPML_CC_Marshal()
5250 TPM_RC TPML_CC_Unmarshal(TPML_CC* target, BYTE** buffer, INT32* size) { in TPML_CC_Unmarshal() argument
5253 result = UINT32_Unmarshal(&target->count, buffer, size); in TPML_CC_Unmarshal()
5261 result = TPM_CC_Unmarshal(&target->commandCodes[i], buffer, size); in TPML_CC_Unmarshal()
5269 UINT16 TPML_CCA_Marshal(TPML_CCA* source, BYTE** buffer, INT32* size) { in TPML_CCA_Marshal() argument
5272 total_size += UINT32_Marshal(&source->count, buffer, size); in TPML_CCA_Marshal()
5274 total_size += TPMA_CC_Marshal(&source->commandAttributes[i], buffer, size); in TPML_CCA_Marshal()
5279 TPM_RC TPML_CCA_Unmarshal(TPML_CCA* target, BYTE** buffer, INT32* size) { in TPML_CCA_Unmarshal() argument
5282 result = UINT32_Unmarshal(&target->count, buffer, size); in TPML_CCA_Unmarshal()
5290 result = TPMA_CC_Unmarshal(&target->commandAttributes[i], buffer, size); in TPML_CCA_Unmarshal()
5298 UINT16 TPML_DIGEST_Marshal(TPML_DIGEST* source, BYTE** buffer, INT32* size) { in TPML_DIGEST_Marshal() argument
5301 total_size += UINT32_Marshal(&source->count, buffer, size); in TPML_DIGEST_Marshal()
5303 total_size += TPM2B_DIGEST_Marshal(&source->digests[i], buffer, size); in TPML_DIGEST_Marshal()
5308 TPM_RC TPML_DIGEST_Unmarshal(TPML_DIGEST* target, BYTE** buffer, INT32* size) { in TPML_DIGEST_Unmarshal() argument
5311 result = UINT32_Unmarshal(&target->count, buffer, size); in TPML_DIGEST_Unmarshal()
5322 result = TPM2B_DIGEST_Unmarshal(&target->digests[i], buffer, size); in TPML_DIGEST_Unmarshal()
5331 BYTE** buffer, in TPMU_HA_Marshal() argument
5340 total_size += BYTE_Marshal(&source->sha[i], buffer, size); in TPMU_HA_Marshal()
5347 total_size += BYTE_Marshal(&source->sha1[i], buffer, size); in TPMU_HA_Marshal()
5354 total_size += BYTE_Marshal(&source->sha256[i], buffer, size); in TPMU_HA_Marshal()
5361 total_size += BYTE_Marshal(&source->sha384[i], buffer, size); in TPMU_HA_Marshal()
5368 total_size += BYTE_Marshal(&source->sha512[i], buffer, size); in TPMU_HA_Marshal()
5375 total_size += BYTE_Marshal(&source->sm3_256[i], buffer, size); in TPMU_HA_Marshal()
5388 BYTE** buffer, in TPMU_HA_Unmarshal() argument
5397 result = BYTE_Unmarshal(&target->sha[i], buffer, size); in TPMU_HA_Unmarshal()
5407 result = BYTE_Unmarshal(&target->sha1[i], buffer, size); in TPMU_HA_Unmarshal()
5417 result = BYTE_Unmarshal(&target->sha256[i], buffer, size); in TPMU_HA_Unmarshal()
5427 result = BYTE_Unmarshal(&target->sha384[i], buffer, size); in TPMU_HA_Unmarshal()
5437 result = BYTE_Unmarshal(&target->sha512[i], buffer, size); in TPMU_HA_Unmarshal()
5447 result = BYTE_Unmarshal(&target->sm3_256[i], buffer, size); in TPMU_HA_Unmarshal()
5462 UINT16 TPMT_HA_Marshal(TPMT_HA* source, BYTE** buffer, INT32* size) { in TPMT_HA_Marshal() argument
5464 total_size += TPMI_ALG_HASH_Marshal(&source->hashAlg, buffer, size); in TPMT_HA_Marshal()
5465 total_size += TPMU_HA_Marshal(&source->digest, buffer, size, source->hashAlg); in TPMT_HA_Marshal()
5469 TPM_RC TPMT_HA_Unmarshal(TPMT_HA* target, BYTE** buffer, INT32* size) { in TPMT_HA_Unmarshal() argument
5471 result = TPMI_ALG_HASH_Unmarshal(&target->hashAlg, buffer, size, TRUE); in TPMT_HA_Unmarshal()
5475 result = TPMU_HA_Unmarshal(&target->digest, buffer, size, target->hashAlg); in TPMT_HA_Unmarshal()
5483 BYTE** buffer, in TPML_DIGEST_VALUES_Marshal() argument
5487 total_size += UINT32_Marshal(&source->count, buffer, size); in TPML_DIGEST_VALUES_Marshal()
5489 total_size += TPMT_HA_Marshal(&source->digests[i], buffer, size); in TPML_DIGEST_VALUES_Marshal()
5495 BYTE** buffer, in TPML_DIGEST_VALUES_Unmarshal() argument
5499 result = UINT32_Unmarshal(&target->count, buffer, size); in TPML_DIGEST_VALUES_Unmarshal()
5507 result = TPMT_HA_Unmarshal(&target->digests[i], buffer, size); in TPML_DIGEST_VALUES_Unmarshal()
5516 BYTE** buffer, in TPM_ECC_CURVE_Marshal() argument
5518 return uint16_t_Marshal(source, buffer, size); in TPM_ECC_CURVE_Marshal()
5522 BYTE** buffer, in TPM_ECC_CURVE_Unmarshal() argument
5525 result = uint16_t_Unmarshal(target, buffer, size); in TPM_ECC_CURVE_Unmarshal()
5560 BYTE** buffer, in TPML_ECC_CURVE_Marshal() argument
5564 total_size += UINT32_Marshal(&source->count, buffer, size); in TPML_ECC_CURVE_Marshal()
5566 total_size += TPM_ECC_CURVE_Marshal(&source->eccCurves[i], buffer, size); in TPML_ECC_CURVE_Marshal()
5572 BYTE** buffer, in TPML_ECC_CURVE_Unmarshal() argument
5576 result = UINT32_Unmarshal(&target->count, buffer, size); in TPML_ECC_CURVE_Unmarshal()
5584 result = TPM_ECC_CURVE_Unmarshal(&target->eccCurves[i], buffer, size); in TPML_ECC_CURVE_Unmarshal()
5592 UINT16 TPM_HANDLE_Marshal(TPM_HANDLE* source, BYTE** buffer, INT32* size) { in TPM_HANDLE_Marshal() argument
5593 return uint32_t_Marshal(source, buffer, size); in TPM_HANDLE_Marshal()
5596 TPM_RC TPM_HANDLE_Unmarshal(TPM_HANDLE* target, BYTE** buffer, INT32* size) { in TPM_HANDLE_Unmarshal() argument
5597 return uint32_t_Unmarshal(target, buffer, size); in TPM_HANDLE_Unmarshal()
5600 UINT16 TPML_HANDLE_Marshal(TPML_HANDLE* source, BYTE** buffer, INT32* size) { in TPML_HANDLE_Marshal() argument
5603 total_size += UINT32_Marshal(&source->count, buffer, size); in TPML_HANDLE_Marshal()
5605 total_size += TPM_HANDLE_Marshal(&source->handle[i], buffer, size); in TPML_HANDLE_Marshal()
5610 TPM_RC TPML_HANDLE_Unmarshal(TPML_HANDLE* target, BYTE** buffer, INT32* size) { in TPML_HANDLE_Unmarshal() argument
5613 result = UINT32_Unmarshal(&target->count, buffer, size); in TPML_HANDLE_Unmarshal()
5621 result = TPM_HANDLE_Unmarshal(&target->handle[i], buffer, size); in TPML_HANDLE_Unmarshal()
5629 UINT16 TPM_PT_Marshal(TPM_PT* source, BYTE** buffer, INT32* size) { in TPM_PT_Marshal() argument
5630 return uint32_t_Marshal(source, buffer, size); in TPM_PT_Marshal()
5633 TPM_RC TPM_PT_Unmarshal(TPM_PT* target, BYTE** buffer, INT32* size) { in TPM_PT_Unmarshal() argument
5635 result = uint32_t_Unmarshal(target, buffer, size); in TPM_PT_Unmarshal()
5850 BYTE** buffer, in TPMS_TAGGED_PCR_SELECT_Marshal() argument
5854 total_size += TPM_PT_Marshal(&source->tag, buffer, size); in TPMS_TAGGED_PCR_SELECT_Marshal()
5855 total_size += UINT8_Marshal(&source->sizeofSelect, buffer, size); in TPMS_TAGGED_PCR_SELECT_Marshal()
5857 total_size += BYTE_Marshal(&source->pcrSelect[i], buffer, size); in TPMS_TAGGED_PCR_SELECT_Marshal()
5863 BYTE** buffer, in TPMS_TAGGED_PCR_SELECT_Unmarshal() argument
5867 result = TPM_PT_Unmarshal(&target->tag, buffer, size); in TPMS_TAGGED_PCR_SELECT_Unmarshal()
5871 result = UINT8_Unmarshal(&target->sizeofSelect, buffer, size); in TPMS_TAGGED_PCR_SELECT_Unmarshal()
5882 result = BYTE_Unmarshal(&target->pcrSelect[i], buffer, size); in TPMS_TAGGED_PCR_SELECT_Unmarshal()
5891 BYTE** buffer, in TPML_TAGGED_PCR_PROPERTY_Marshal() argument
5895 total_size += UINT32_Marshal(&source->count, buffer, size); in TPML_TAGGED_PCR_PROPERTY_Marshal()
5898 TPMS_TAGGED_PCR_SELECT_Marshal(&source->pcrProperty[i], buffer, size); in TPML_TAGGED_PCR_PROPERTY_Marshal()
5904 BYTE** buffer, in TPML_TAGGED_PCR_PROPERTY_Unmarshal() argument
5908 result = UINT32_Unmarshal(&target->count, buffer, size); in TPML_TAGGED_PCR_PROPERTY_Unmarshal()
5917 TPMS_TAGGED_PCR_SELECT_Unmarshal(&target->pcrProperty[i], buffer, size); in TPML_TAGGED_PCR_PROPERTY_Unmarshal()
5926 BYTE** buffer, in TPMS_TAGGED_PROPERTY_Marshal() argument
5929 total_size += TPM_PT_Marshal(&source->property, buffer, size); in TPMS_TAGGED_PROPERTY_Marshal()
5930 total_size += UINT32_Marshal(&source->value, buffer, size); in TPMS_TAGGED_PROPERTY_Marshal()
5935 BYTE** buffer, in TPMS_TAGGED_PROPERTY_Unmarshal() argument
5938 result = TPM_PT_Unmarshal(&target->property, buffer, size); in TPMS_TAGGED_PROPERTY_Unmarshal()
5942 result = UINT32_Unmarshal(&target->value, buffer, size); in TPMS_TAGGED_PROPERTY_Unmarshal()
5950 BYTE** buffer, in TPML_TAGGED_TPM_PROPERTY_Marshal() argument
5954 total_size += UINT32_Marshal(&source->count, buffer, size); in TPML_TAGGED_TPM_PROPERTY_Marshal()
5957 TPMS_TAGGED_PROPERTY_Marshal(&source->tpmProperty[i], buffer, size); in TPML_TAGGED_TPM_PROPERTY_Marshal()
5963 BYTE** buffer, in TPML_TAGGED_TPM_PROPERTY_Unmarshal() argument
5967 result = UINT32_Unmarshal(&target->count, buffer, size); in TPML_TAGGED_TPM_PROPERTY_Unmarshal()
5976 TPMS_TAGGED_PROPERTY_Unmarshal(&target->tpmProperty[i], buffer, size); in TPML_TAGGED_TPM_PROPERTY_Unmarshal()
5985 BYTE** buffer, in TPMS_ALGORITHM_DESCRIPTION_Marshal() argument
5988 total_size += TPM_ALG_ID_Marshal(&source->alg, buffer, size); in TPMS_ALGORITHM_DESCRIPTION_Marshal()
5989 total_size += TPMA_ALGORITHM_Marshal(&source->attributes, buffer, size); in TPMS_ALGORITHM_DESCRIPTION_Marshal()
5994 BYTE** buffer, in TPMS_ALGORITHM_DESCRIPTION_Unmarshal() argument
5997 result = TPM_ALG_ID_Unmarshal(&target->alg, buffer, size); in TPMS_ALGORITHM_DESCRIPTION_Unmarshal()
6001 result = TPMA_ALGORITHM_Unmarshal(&target->attributes, buffer, size); in TPMS_ALGORITHM_DESCRIPTION_Unmarshal()
6009 BYTE** buffer, in TPMS_ALGORITHM_DETAIL_ECC_Marshal() argument
6012 total_size += TPM_ECC_CURVE_Marshal(&source->curveID, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Marshal()
6013 total_size += UINT16_Marshal(&source->keySize, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Marshal()
6014 total_size += TPMT_KDF_SCHEME_Marshal(&source->kdf, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Marshal()
6015 total_size += TPMT_ECC_SCHEME_Marshal(&source->sign, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Marshal()
6016 total_size += TPM2B_ECC_PARAMETER_Marshal(&source->p, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Marshal()
6017 total_size += TPM2B_ECC_PARAMETER_Marshal(&source->a, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Marshal()
6018 total_size += TPM2B_ECC_PARAMETER_Marshal(&source->b, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Marshal()
6019 total_size += TPM2B_ECC_PARAMETER_Marshal(&source->gX, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Marshal()
6020 total_size += TPM2B_ECC_PARAMETER_Marshal(&source->gY, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Marshal()
6021 total_size += TPM2B_ECC_PARAMETER_Marshal(&source->n, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Marshal()
6022 total_size += TPM2B_ECC_PARAMETER_Marshal(&source->h, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Marshal()
6027 BYTE** buffer, in TPMS_ALGORITHM_DETAIL_ECC_Unmarshal() argument
6030 result = TPM_ECC_CURVE_Unmarshal(&target->curveID, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Unmarshal()
6034 result = UINT16_Unmarshal(&target->keySize, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Unmarshal()
6038 result = TPMT_KDF_SCHEME_Unmarshal(&target->kdf, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Unmarshal()
6042 result = TPMT_ECC_SCHEME_Unmarshal(&target->sign, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Unmarshal()
6046 result = TPM2B_ECC_PARAMETER_Unmarshal(&target->p, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Unmarshal()
6050 result = TPM2B_ECC_PARAMETER_Unmarshal(&target->a, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Unmarshal()
6054 result = TPM2B_ECC_PARAMETER_Unmarshal(&target->b, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Unmarshal()
6058 result = TPM2B_ECC_PARAMETER_Unmarshal(&target->gX, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Unmarshal()
6062 result = TPM2B_ECC_PARAMETER_Unmarshal(&target->gY, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Unmarshal()
6066 result = TPM2B_ECC_PARAMETER_Unmarshal(&target->n, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Unmarshal()
6070 result = TPM2B_ECC_PARAMETER_Unmarshal(&target->h, buffer, size); in TPMS_ALGORITHM_DETAIL_ECC_Unmarshal()
6077 UINT16 UINT64_Marshal(UINT64* source, BYTE** buffer, INT32* size) { in UINT64_Marshal() argument
6078 return uint64_t_Marshal(source, buffer, size); in UINT64_Marshal()
6081 TPM_RC UINT64_Unmarshal(UINT64* target, BYTE** buffer, INT32* size) { in UINT64_Unmarshal() argument
6082 return uint64_t_Unmarshal(target, buffer, size); in UINT64_Unmarshal()
6086 BYTE** buffer, in TPM_GENERATED_Marshal() argument
6088 return uint32_t_Marshal(source, buffer, size); in TPM_GENERATED_Marshal()
6092 BYTE** buffer, in TPM_GENERATED_Unmarshal() argument
6095 result = uint32_t_Unmarshal(target, buffer, size); in TPM_GENERATED_Unmarshal()
6106 BYTE** buffer, in TPMS_CREATION_INFO_Marshal() argument
6109 total_size += TPM2B_NAME_Marshal(&source->objectName, buffer, size); in TPMS_CREATION_INFO_Marshal()
6110 total_size += TPM2B_DIGEST_Marshal(&source->creationHash, buffer, size); in TPMS_CREATION_INFO_Marshal()
6115 BYTE** buffer, in TPMS_CREATION_INFO_Unmarshal() argument
6118 result = TPM2B_NAME_Unmarshal(&target->objectName, buffer, size); in TPMS_CREATION_INFO_Unmarshal()
6122 result = TPM2B_DIGEST_Unmarshal(&target->creationHash, buffer, size); in TPMS_CREATION_INFO_Unmarshal()
6130 BYTE** buffer, in TPMS_COMMAND_AUDIT_INFO_Marshal() argument
6133 total_size += UINT64_Marshal(&source->auditCounter, buffer, size); in TPMS_COMMAND_AUDIT_INFO_Marshal()
6134 total_size += TPM_ALG_ID_Marshal(&source->digestAlg, buffer, size); in TPMS_COMMAND_AUDIT_INFO_Marshal()
6135 total_size += TPM2B_DIGEST_Marshal(&source->auditDigest, buffer, size); in TPMS_COMMAND_AUDIT_INFO_Marshal()
6136 total_size += TPM2B_DIGEST_Marshal(&source->commandDigest, buffer, size); in TPMS_COMMAND_AUDIT_INFO_Marshal()
6141 BYTE** buffer, in TPMS_COMMAND_AUDIT_INFO_Unmarshal() argument
6144 result = UINT64_Unmarshal(&target->auditCounter, buffer, size); in TPMS_COMMAND_AUDIT_INFO_Unmarshal()
6148 result = TPM_ALG_ID_Unmarshal(&target->digestAlg, buffer, size); in TPMS_COMMAND_AUDIT_INFO_Unmarshal()
6152 result = TPM2B_DIGEST_Unmarshal(&target->auditDigest, buffer, size); in TPMS_COMMAND_AUDIT_INFO_Unmarshal()
6156 result = TPM2B_DIGEST_Unmarshal(&target->commandDigest, buffer, size); in TPMS_COMMAND_AUDIT_INFO_Unmarshal()
6164 BYTE** buffer, in TPMS_QUOTE_INFO_Marshal() argument
6167 total_size += TPML_PCR_SELECTION_Marshal(&source->pcrSelect, buffer, size); in TPMS_QUOTE_INFO_Marshal()
6168 total_size += TPM2B_DIGEST_Marshal(&source->pcrDigest, buffer, size); in TPMS_QUOTE_INFO_Marshal()
6173 BYTE** buffer, in TPMS_QUOTE_INFO_Unmarshal() argument
6176 result = TPML_PCR_SELECTION_Unmarshal(&target->pcrSelect, buffer, size); in TPMS_QUOTE_INFO_Unmarshal()
6180 result = TPM2B_DIGEST_Unmarshal(&target->pcrDigest, buffer, size); in TPMS_QUOTE_INFO_Unmarshal()
6188 BYTE** buffer, in TPMS_CERTIFY_INFO_Marshal() argument
6191 total_size += TPM2B_NAME_Marshal(&source->name, buffer, size); in TPMS_CERTIFY_INFO_Marshal()
6192 total_size += TPM2B_NAME_Marshal(&source->qualifiedName, buffer, size); in TPMS_CERTIFY_INFO_Marshal()
6197 BYTE** buffer, in TPMS_CERTIFY_INFO_Unmarshal() argument
6200 result = TPM2B_NAME_Unmarshal(&target->name, buffer, size); in TPMS_CERTIFY_INFO_Unmarshal()
6204 result = TPM2B_NAME_Unmarshal(&target->qualifiedName, buffer, size); in TPMS_CERTIFY_INFO_Unmarshal()
6212 BYTE** buffer, in TPMS_SESSION_AUDIT_INFO_Marshal() argument
6215 total_size += TPMI_YES_NO_Marshal(&source->exclusiveSession, buffer, size); in TPMS_SESSION_AUDIT_INFO_Marshal()
6216 total_size += TPM2B_DIGEST_Marshal(&source->sessionDigest, buffer, size); in TPMS_SESSION_AUDIT_INFO_Marshal()
6221 BYTE** buffer, in TPMS_SESSION_AUDIT_INFO_Unmarshal() argument
6224 result = TPMI_YES_NO_Unmarshal(&target->exclusiveSession, buffer, size); in TPMS_SESSION_AUDIT_INFO_Unmarshal()
6228 result = TPM2B_DIGEST_Unmarshal(&target->sessionDigest, buffer, size); in TPMS_SESSION_AUDIT_INFO_Unmarshal()
6236 BYTE** buffer, in TPMS_CLOCK_INFO_Marshal() argument
6239 total_size += UINT64_Marshal(&source->clock, buffer, size); in TPMS_CLOCK_INFO_Marshal()
6240 total_size += UINT32_Marshal(&source->resetCount, buffer, size); in TPMS_CLOCK_INFO_Marshal()
6241 total_size += UINT32_Marshal(&source->restartCount, buffer, size); in TPMS_CLOCK_INFO_Marshal()
6242 total_size += TPMI_YES_NO_Marshal(&source->safe, buffer, size); in TPMS_CLOCK_INFO_Marshal()
6247 BYTE** buffer, in TPMS_CLOCK_INFO_Unmarshal() argument
6250 result = UINT64_Unmarshal(&target->clock, buffer, size); in TPMS_CLOCK_INFO_Unmarshal()
6254 result = UINT32_Unmarshal(&target->resetCount, buffer, size); in TPMS_CLOCK_INFO_Unmarshal()
6258 result = UINT32_Unmarshal(&target->restartCount, buffer, size); in TPMS_CLOCK_INFO_Unmarshal()
6262 result = TPMI_YES_NO_Unmarshal(&target->safe, buffer, size); in TPMS_CLOCK_INFO_Unmarshal()
6270 BYTE** buffer, in TPMS_TIME_INFO_Marshal() argument
6273 total_size += UINT64_Marshal(&source->time, buffer, size); in TPMS_TIME_INFO_Marshal()
6274 total_size += TPMS_CLOCK_INFO_Marshal(&source->clockInfo, buffer, size); in TPMS_TIME_INFO_Marshal()
6279 BYTE** buffer, in TPMS_TIME_INFO_Unmarshal() argument
6282 result = UINT64_Unmarshal(&target->time, buffer, size); in TPMS_TIME_INFO_Unmarshal()
6286 result = TPMS_CLOCK_INFO_Unmarshal(&target->clockInfo, buffer, size); in TPMS_TIME_INFO_Unmarshal()
6294 BYTE** buffer, in TPMS_TIME_ATTEST_INFO_Marshal() argument
6297 total_size += TPMS_TIME_INFO_Marshal(&source->time, buffer, size); in TPMS_TIME_ATTEST_INFO_Marshal()
6298 total_size += UINT64_Marshal(&source->firmwareVersion, buffer, size); in TPMS_TIME_ATTEST_INFO_Marshal()
6303 BYTE** buffer, in TPMS_TIME_ATTEST_INFO_Unmarshal() argument
6306 result = TPMS_TIME_INFO_Unmarshal(&target->time, buffer, size); in TPMS_TIME_ATTEST_INFO_Unmarshal()
6310 result = UINT64_Unmarshal(&target->firmwareVersion, buffer, size); in TPMS_TIME_ATTEST_INFO_Unmarshal()
6318 BYTE** buffer, in TPMS_NV_CERTIFY_INFO_Marshal() argument
6321 total_size += TPM2B_NAME_Marshal(&source->indexName, buffer, size); in TPMS_NV_CERTIFY_INFO_Marshal()
6322 total_size += UINT16_Marshal(&source->offset, buffer, size); in TPMS_NV_CERTIFY_INFO_Marshal()
6323 total_size += TPM2B_MAX_NV_BUFFER_Marshal(&source->nvContents, buffer, size); in TPMS_NV_CERTIFY_INFO_Marshal()
6328 BYTE** buffer, in TPMS_NV_CERTIFY_INFO_Unmarshal() argument
6331 result = TPM2B_NAME_Unmarshal(&target->indexName, buffer, size); in TPMS_NV_CERTIFY_INFO_Unmarshal()
6335 result = UINT16_Unmarshal(&target->offset, buffer, size); in TPMS_NV_CERTIFY_INFO_Unmarshal()
6339 result = TPM2B_MAX_NV_BUFFER_Unmarshal(&target->nvContents, buffer, size); in TPMS_NV_CERTIFY_INFO_Unmarshal()
6347 BYTE** buffer, in TPMU_ATTEST_Marshal() argument
6353 buffer, size); in TPMU_ATTEST_Marshal()
6356 buffer, size); in TPMU_ATTEST_Marshal()
6358 return TPMS_QUOTE_INFO_Marshal((TPMS_QUOTE_INFO*)&source->quote, buffer, in TPMU_ATTEST_Marshal()
6362 (TPMS_COMMAND_AUDIT_INFO*)&source->commandAudit, buffer, size); in TPMU_ATTEST_Marshal()
6365 (TPMS_SESSION_AUDIT_INFO*)&source->sessionAudit, buffer, size); in TPMU_ATTEST_Marshal()
6368 (TPMS_TIME_ATTEST_INFO*)&source->time, buffer, size); in TPMU_ATTEST_Marshal()
6371 buffer, size); in TPMU_ATTEST_Marshal()
6377 BYTE** buffer, in TPMU_ATTEST_Unmarshal() argument
6383 buffer, size); in TPMU_ATTEST_Unmarshal()
6386 (TPMS_CREATION_INFO*)&target->creation, buffer, size); in TPMU_ATTEST_Unmarshal()
6388 return TPMS_QUOTE_INFO_Unmarshal((TPMS_QUOTE_INFO*)&target->quote, buffer, in TPMU_ATTEST_Unmarshal()
6392 (TPMS_COMMAND_AUDIT_INFO*)&target->commandAudit, buffer, size); in TPMU_ATTEST_Unmarshal()
6395 (TPMS_SESSION_AUDIT_INFO*)&target->sessionAudit, buffer, size); in TPMU_ATTEST_Unmarshal()
6398 (TPMS_TIME_ATTEST_INFO*)&target->time, buffer, size); in TPMU_ATTEST_Unmarshal()
6401 buffer, size); in TPMU_ATTEST_Unmarshal()
6406 UINT16 TPMS_ATTEST_Marshal(TPMS_ATTEST* source, BYTE** buffer, INT32* size) { in TPMS_ATTEST_Marshal() argument
6408 total_size += TPM_GENERATED_Marshal(&source->magic, buffer, size); in TPMS_ATTEST_Marshal()
6409 total_size += TPMI_ST_ATTEST_Marshal(&source->type, buffer, size); in TPMS_ATTEST_Marshal()
6410 total_size += TPM2B_NAME_Marshal(&source->qualifiedSigner, buffer, size); in TPMS_ATTEST_Marshal()
6411 total_size += TPM2B_DATA_Marshal(&source->extraData, buffer, size); in TPMS_ATTEST_Marshal()
6412 total_size += TPMS_CLOCK_INFO_Marshal(&source->clockInfo, buffer, size); in TPMS_ATTEST_Marshal()
6413 total_size += UINT64_Marshal(&source->firmwareVersion, buffer, size); in TPMS_ATTEST_Marshal()
6415 TPMU_ATTEST_Marshal(&source->attested, buffer, size, source->type); in TPMS_ATTEST_Marshal()
6419 TPM_RC TPMS_ATTEST_Unmarshal(TPMS_ATTEST* target, BYTE** buffer, INT32* size) { in TPMS_ATTEST_Unmarshal() argument
6421 result = TPM_GENERATED_Unmarshal(&target->magic, buffer, size); in TPMS_ATTEST_Unmarshal()
6425 result = TPMI_ST_ATTEST_Unmarshal(&target->type, buffer, size); in TPMS_ATTEST_Unmarshal()
6429 result = TPM2B_NAME_Unmarshal(&target->qualifiedSigner, buffer, size); in TPMS_ATTEST_Unmarshal()
6433 result = TPM2B_DATA_Unmarshal(&target->extraData, buffer, size); in TPMS_ATTEST_Unmarshal()
6437 result = TPMS_CLOCK_INFO_Unmarshal(&target->clockInfo, buffer, size); in TPMS_ATTEST_Unmarshal()
6441 result = UINT64_Unmarshal(&target->firmwareVersion, buffer, size); in TPMS_ATTEST_Unmarshal()
6445 result = TPMU_ATTEST_Unmarshal(&target->attested, buffer, size, target->type); in TPMS_ATTEST_Unmarshal()
6453 BYTE** buffer, in TPMS_AUTH_COMMAND_Marshal() argument
6457 TPMI_SH_AUTH_SESSION_Marshal(&source->sessionHandle, buffer, size); in TPMS_AUTH_COMMAND_Marshal()
6458 total_size += TPM2B_NONCE_Marshal(&source->nonce, buffer, size); in TPMS_AUTH_COMMAND_Marshal()
6459 total_size += TPMA_SESSION_Marshal(&source->sessionAttributes, buffer, size); in TPMS_AUTH_COMMAND_Marshal()
6460 total_size += TPM2B_AUTH_Marshal(&source->hmac, buffer, size); in TPMS_AUTH_COMMAND_Marshal()
6465 BYTE** buffer, in TPMS_AUTH_COMMAND_Unmarshal() argument
6468 result = TPMI_SH_AUTH_SESSION_Unmarshal(&target->sessionHandle, buffer, size, in TPMS_AUTH_COMMAND_Unmarshal()
6473 result = TPM2B_NONCE_Unmarshal(&target->nonce, buffer, size); in TPMS_AUTH_COMMAND_Unmarshal()
6477 result = TPMA_SESSION_Unmarshal(&target->sessionAttributes, buffer, size); in TPMS_AUTH_COMMAND_Unmarshal()
6481 result = TPM2B_AUTH_Unmarshal(&target->hmac, buffer, size); in TPMS_AUTH_COMMAND_Unmarshal()
6489 BYTE** buffer, in TPMS_AUTH_RESPONSE_Marshal() argument
6492 total_size += TPM2B_NONCE_Marshal(&source->nonce, buffer, size); in TPMS_AUTH_RESPONSE_Marshal()
6493 total_size += TPMA_SESSION_Marshal(&source->sessionAttributes, buffer, size); in TPMS_AUTH_RESPONSE_Marshal()
6494 total_size += TPM2B_AUTH_Marshal(&source->hmac, buffer, size); in TPMS_AUTH_RESPONSE_Marshal()
6499 BYTE** buffer, in TPMS_AUTH_RESPONSE_Unmarshal() argument
6502 result = TPM2B_NONCE_Unmarshal(&target->nonce, buffer, size); in TPMS_AUTH_RESPONSE_Unmarshal()
6506 result = TPMA_SESSION_Unmarshal(&target->sessionAttributes, buffer, size); in TPMS_AUTH_RESPONSE_Unmarshal()
6510 result = TPM2B_AUTH_Unmarshal(&target->hmac, buffer, size); in TPMS_AUTH_RESPONSE_Unmarshal()
6517 UINT16 TPM_CAP_Marshal(TPM_CAP* source, BYTE** buffer, INT32* size) { in TPM_CAP_Marshal() argument
6518 return uint32_t_Marshal(source, buffer, size); in TPM_CAP_Marshal()
6521 TPM_RC TPM_CAP_Unmarshal(TPM_CAP* target, BYTE** buffer, INT32* size) { in TPM_CAP_Unmarshal() argument
6523 result = uint32_t_Unmarshal(target, buffer, size); in TPM_CAP_Unmarshal()
6567 BYTE** buffer, in TPMU_CAPABILITIES_Marshal() argument
6573 buffer, size); in TPMU_CAPABILITIES_Marshal()
6575 return TPML_HANDLE_Marshal((TPML_HANDLE*)&source->handles, buffer, size); in TPMU_CAPABILITIES_Marshal()
6577 return TPML_CCA_Marshal((TPML_CCA*)&source->command, buffer, size); in TPMU_CAPABILITIES_Marshal()
6579 return TPML_CC_Marshal((TPML_CC*)&source->ppCommands, buffer, size); in TPMU_CAPABILITIES_Marshal()
6581 return TPML_CC_Marshal((TPML_CC*)&source->auditCommands, buffer, size); in TPMU_CAPABILITIES_Marshal()
6584 (TPML_PCR_SELECTION*)&source->assignedPCR, buffer, size); in TPMU_CAPABILITIES_Marshal()
6587 (TPML_TAGGED_TPM_PROPERTY*)&source->tpmProperties, buffer, size); in TPMU_CAPABILITIES_Marshal()
6590 (TPML_TAGGED_PCR_PROPERTY*)&source->pcrProperties, buffer, size); in TPMU_CAPABILITIES_Marshal()
6592 return TPML_ECC_CURVE_Marshal((TPML_ECC_CURVE*)&source->eccCurves, buffer, in TPMU_CAPABILITIES_Marshal()
6599 BYTE** buffer, in TPMU_CAPABILITIES_Unmarshal() argument
6605 (TPML_ALG_PROPERTY*)&target->algorithms, buffer, size); in TPMU_CAPABILITIES_Unmarshal()
6607 return TPML_HANDLE_Unmarshal((TPML_HANDLE*)&target->handles, buffer, in TPMU_CAPABILITIES_Unmarshal()
6610 return TPML_CCA_Unmarshal((TPML_CCA*)&target->command, buffer, size); in TPMU_CAPABILITIES_Unmarshal()
6612 return TPML_CC_Unmarshal((TPML_CC*)&target->ppCommands, buffer, size); in TPMU_CAPABILITIES_Unmarshal()
6614 return TPML_CC_Unmarshal((TPML_CC*)&target->auditCommands, buffer, size); in TPMU_CAPABILITIES_Unmarshal()
6617 (TPML_PCR_SELECTION*)&target->assignedPCR, buffer, size); in TPMU_CAPABILITIES_Unmarshal()
6620 (TPML_TAGGED_TPM_PROPERTY*)&target->tpmProperties, buffer, size); in TPMU_CAPABILITIES_Unmarshal()
6623 (TPML_TAGGED_PCR_PROPERTY*)&target->pcrProperties, buffer, size); in TPMU_CAPABILITIES_Unmarshal()
6626 buffer, size); in TPMU_CAPABILITIES_Unmarshal()
6632 BYTE** buffer, in TPMS_CAPABILITY_DATA_Marshal() argument
6635 total_size += TPM_CAP_Marshal(&source->capability, buffer, size); in TPMS_CAPABILITY_DATA_Marshal()
6636 total_size += TPMU_CAPABILITIES_Marshal(&source->data, buffer, size, in TPMS_CAPABILITY_DATA_Marshal()
6642 BYTE** buffer, in TPMS_CAPABILITY_DATA_Unmarshal() argument
6645 result = TPM_CAP_Unmarshal(&target->capability, buffer, size); in TPMS_CAPABILITY_DATA_Unmarshal()
6649 result = TPMU_CAPABILITIES_Unmarshal(&target->data, buffer, size, in TPMS_CAPABILITY_DATA_Unmarshal()
6657 UINT16 TPMS_CONTEXT_Marshal(TPMS_CONTEXT* source, BYTE** buffer, INT32* size) { in TPMS_CONTEXT_Marshal() argument
6659 total_size += UINT64_Marshal(&source->sequence, buffer, size); in TPMS_CONTEXT_Marshal()
6660 total_size += TPMI_DH_CONTEXT_Marshal(&source->savedHandle, buffer, size); in TPMS_CONTEXT_Marshal()
6661 total_size += TPMI_RH_HIERARCHY_Marshal(&source->hierarchy, buffer, size); in TPMS_CONTEXT_Marshal()
6662 total_size += TPM2B_CONTEXT_DATA_Marshal(&source->contextBlob, buffer, size); in TPMS_CONTEXT_Marshal()
6667 BYTE** buffer, in TPMS_CONTEXT_Unmarshal() argument
6670 result = UINT64_Unmarshal(&target->sequence, buffer, size); in TPMS_CONTEXT_Unmarshal()
6674 result = TPMI_DH_CONTEXT_Unmarshal(&target->savedHandle, buffer, size); in TPMS_CONTEXT_Unmarshal()
6678 result = TPMI_RH_HIERARCHY_Unmarshal(&target->hierarchy, buffer, size, TRUE); in TPMS_CONTEXT_Unmarshal()
6682 result = TPM2B_CONTEXT_DATA_Unmarshal(&target->contextBlob, buffer, size); in TPMS_CONTEXT_Unmarshal()
6690 BYTE** buffer, in TPMS_CONTEXT_DATA_Marshal() argument
6693 total_size += TPM2B_DIGEST_Marshal(&source->integrity, buffer, size); in TPMS_CONTEXT_DATA_Marshal()
6695 TPM2B_CONTEXT_SENSITIVE_Marshal(&source->encrypted, buffer, size); in TPMS_CONTEXT_DATA_Marshal()
6700 BYTE** buffer, in TPMS_CONTEXT_DATA_Unmarshal() argument
6703 result = TPM2B_DIGEST_Unmarshal(&target->integrity, buffer, size); in TPMS_CONTEXT_DATA_Unmarshal()
6707 result = TPM2B_CONTEXT_SENSITIVE_Unmarshal(&target->encrypted, buffer, size); in TPMS_CONTEXT_DATA_Unmarshal()
6715 BYTE** buffer, in TPMS_PCR_SELECT_Marshal() argument
6719 total_size += UINT8_Marshal(&source->sizeofSelect, buffer, size); in TPMS_PCR_SELECT_Marshal()
6721 total_size += BYTE_Marshal(&source->pcrSelect[i], buffer, size); in TPMS_PCR_SELECT_Marshal()
6727 BYTE** buffer, in TPMS_PCR_SELECT_Unmarshal() argument
6731 result = UINT8_Unmarshal(&target->sizeofSelect, buffer, size); in TPMS_PCR_SELECT_Unmarshal()
6742 result = BYTE_Unmarshal(&target->pcrSelect[i], buffer, size); in TPMS_PCR_SELECT_Unmarshal()
6751 BYTE** buffer, in TPMS_SIGNATURE_ECC_Marshal() argument
6754 total_size += TPMI_ALG_HASH_Marshal(&source->hash, buffer, size); in TPMS_SIGNATURE_ECC_Marshal()
6755 total_size += TPM2B_ECC_PARAMETER_Marshal(&source->signatureR, buffer, size); in TPMS_SIGNATURE_ECC_Marshal()
6756 total_size += TPM2B_ECC_PARAMETER_Marshal(&source->signatureS, buffer, size); in TPMS_SIGNATURE_ECC_Marshal()
6761 BYTE** buffer, in TPMS_SIGNATURE_ECC_Unmarshal() argument
6764 result = TPMI_ALG_HASH_Unmarshal(&target->hash, buffer, size, FALSE); in TPMS_SIGNATURE_ECC_Unmarshal()
6768 result = TPM2B_ECC_PARAMETER_Unmarshal(&target->signatureR, buffer, size); in TPMS_SIGNATURE_ECC_Unmarshal()
6772 result = TPM2B_ECC_PARAMETER_Unmarshal(&target->signatureS, buffer, size); in TPMS_SIGNATURE_ECC_Unmarshal()
6780 BYTE** buffer, in TPMS_SIGNATURE_ECDAA_Marshal() argument
6782 return TPMS_SIGNATURE_ECC_Marshal(source, buffer, size); in TPMS_SIGNATURE_ECDAA_Marshal()
6786 BYTE** buffer, in TPMS_SIGNATURE_ECDAA_Unmarshal() argument
6788 return TPMS_SIGNATURE_ECC_Unmarshal(target, buffer, size); in TPMS_SIGNATURE_ECDAA_Unmarshal()
6792 BYTE** buffer, in TPMS_SIGNATURE_ECDSA_Marshal() argument
6794 return TPMS_SIGNATURE_ECC_Marshal(source, buffer, size); in TPMS_SIGNATURE_ECDSA_Marshal()
6798 BYTE** buffer, in TPMS_SIGNATURE_ECDSA_Unmarshal() argument
6800 return TPMS_SIGNATURE_ECC_Unmarshal(target, buffer, size); in TPMS_SIGNATURE_ECDSA_Unmarshal()
6804 BYTE** buffer, in TPMS_SIGNATURE_ECSCHNORR_Marshal() argument
6806 return TPMS_SIGNATURE_ECC_Marshal(source, buffer, size); in TPMS_SIGNATURE_ECSCHNORR_Marshal()
6810 BYTE** buffer, in TPMS_SIGNATURE_ECSCHNORR_Unmarshal() argument
6812 return TPMS_SIGNATURE_ECC_Unmarshal(target, buffer, size); in TPMS_SIGNATURE_ECSCHNORR_Unmarshal()
6816 BYTE** buffer, in TPMS_SIGNATURE_RSA_Marshal() argument
6819 total_size += TPMI_ALG_HASH_Marshal(&source->hash, buffer, size); in TPMS_SIGNATURE_RSA_Marshal()
6820 total_size += TPM2B_PUBLIC_KEY_RSA_Marshal(&source->sig, buffer, size); in TPMS_SIGNATURE_RSA_Marshal()
6825 BYTE** buffer, in TPMS_SIGNATURE_RSA_Unmarshal() argument
6828 result = TPMI_ALG_HASH_Unmarshal(&target->hash, buffer, size, FALSE); in TPMS_SIGNATURE_RSA_Unmarshal()
6832 result = TPM2B_PUBLIC_KEY_RSA_Unmarshal(&target->sig, buffer, size); in TPMS_SIGNATURE_RSA_Unmarshal()
6840 BYTE** buffer, in TPMS_SIGNATURE_RSAPSS_Marshal() argument
6842 return TPMS_SIGNATURE_RSA_Marshal(source, buffer, size); in TPMS_SIGNATURE_RSAPSS_Marshal()
6846 BYTE** buffer, in TPMS_SIGNATURE_RSAPSS_Unmarshal() argument
6848 return TPMS_SIGNATURE_RSA_Unmarshal(target, buffer, size); in TPMS_SIGNATURE_RSAPSS_Unmarshal()
6852 BYTE** buffer, in TPMS_SIGNATURE_RSASSA_Marshal() argument
6854 return TPMS_SIGNATURE_RSA_Marshal(source, buffer, size); in TPMS_SIGNATURE_RSASSA_Marshal()
6858 BYTE** buffer, in TPMS_SIGNATURE_RSASSA_Unmarshal() argument
6860 return TPMS_SIGNATURE_RSA_Unmarshal(target, buffer, size); in TPMS_SIGNATURE_RSASSA_Unmarshal()
6864 BYTE** buffer, in TPMS_SIGNATURE_SM2_Marshal() argument
6866 return TPMS_SIGNATURE_ECC_Marshal(source, buffer, size); in TPMS_SIGNATURE_SM2_Marshal()
6870 BYTE** buffer, in TPMS_SIGNATURE_SM2_Unmarshal() argument
6872 return TPMS_SIGNATURE_ECC_Unmarshal(target, buffer, size); in TPMS_SIGNATURE_SM2_Unmarshal()
6876 BYTE** buffer, in TPMT_PUBLIC_PARMS_Marshal() argument
6879 total_size += TPMI_ALG_PUBLIC_Marshal(&source->type, buffer, size); in TPMT_PUBLIC_PARMS_Marshal()
6880 total_size += TPMU_PUBLIC_PARMS_Marshal(&source->parameters, buffer, size, in TPMT_PUBLIC_PARMS_Marshal()
6886 BYTE** buffer, in TPMT_PUBLIC_PARMS_Unmarshal() argument
6889 result = TPMI_ALG_PUBLIC_Unmarshal(&target->type, buffer, size); in TPMT_PUBLIC_PARMS_Unmarshal()
6893 result = TPMU_PUBLIC_PARMS_Unmarshal(&target->parameters, buffer, size, in TPMT_PUBLIC_PARMS_Unmarshal()
6902 BYTE** buffer, in TPMT_RSA_DECRYPT_Marshal() argument
6905 total_size += TPMI_ALG_RSA_DECRYPT_Marshal(&source->scheme, buffer, size); in TPMT_RSA_DECRYPT_Marshal()
6907 TPMU_ASYM_SCHEME_Marshal(&source->details, buffer, size, source->scheme); in TPMT_RSA_DECRYPT_Marshal()
6912 BYTE** buffer, in TPMT_RSA_DECRYPT_Unmarshal() argument
6915 result = TPMI_ALG_RSA_DECRYPT_Unmarshal(&target->scheme, buffer, size, TRUE); in TPMT_RSA_DECRYPT_Unmarshal()
6919 result = TPMU_ASYM_SCHEME_Unmarshal(&target->details, buffer, size, in TPMT_RSA_DECRYPT_Unmarshal()
6928 BYTE** buffer, in TPMU_SIGNATURE_Marshal() argument
6935 (TPMS_SIGNATURE_RSASSA*)&source->rsassa, buffer, size); in TPMU_SIGNATURE_Marshal()
6940 (TPMS_SIGNATURE_RSAPSS*)&source->rsapss, buffer, size); in TPMU_SIGNATURE_Marshal()
6945 buffer, size); in TPMU_SIGNATURE_Marshal()
6950 buffer, size); in TPMU_SIGNATURE_Marshal()
6955 buffer, size); in TPMU_SIGNATURE_Marshal()
6960 (TPMS_SIGNATURE_ECSCHNORR*)&source->ecschnorr, buffer, size); in TPMU_SIGNATURE_Marshal()
6964 return TPMT_HA_Marshal((TPMT_HA*)&source->hmac, buffer, size); in TPMU_SIGNATURE_Marshal()
6975 BYTE** buffer, in TPMU_SIGNATURE_Unmarshal() argument
6982 (TPMS_SIGNATURE_RSASSA*)&target->rsassa, buffer, size); in TPMU_SIGNATURE_Unmarshal()
6987 (TPMS_SIGNATURE_RSAPSS*)&target->rsapss, buffer, size); in TPMU_SIGNATURE_Unmarshal()
6992 (TPMS_SIGNATURE_ECDSA*)&target->ecdsa, buffer, size); in TPMU_SIGNATURE_Unmarshal()
6997 (TPMS_SIGNATURE_ECDAA*)&target->ecdaa, buffer, size); in TPMU_SIGNATURE_Unmarshal()
7002 buffer, size); in TPMU_SIGNATURE_Unmarshal()
7007 (TPMS_SIGNATURE_ECSCHNORR*)&target->ecschnorr, buffer, size); in TPMU_SIGNATURE_Unmarshal()
7011 return TPMT_HA_Unmarshal((TPMT_HA*)&target->hmac, buffer, size); in TPMU_SIGNATURE_Unmarshal()
7022 BYTE** buffer, in TPMT_SIGNATURE_Marshal() argument
7025 total_size += TPMI_ALG_SIG_SCHEME_Marshal(&source->sigAlg, buffer, size); in TPMT_SIGNATURE_Marshal()
7027 TPMU_SIGNATURE_Marshal(&source->signature, buffer, size, source->sigAlg); in TPMT_SIGNATURE_Marshal()
7032 BYTE** buffer, in TPMT_SIGNATURE_Unmarshal() argument
7035 result = TPMI_ALG_SIG_SCHEME_Unmarshal(&target->sigAlg, buffer, size, TRUE); in TPMT_SIGNATURE_Unmarshal()
7039 result = TPMU_SIGNATURE_Unmarshal(&target->signature, buffer, size, in TPMT_SIGNATURE_Unmarshal()
7048 BYTE** buffer, in TPMU_SIG_SCHEME_Marshal() argument
7055 (TPMS_SIG_SCHEME_RSASSA*)&source->rsassa, buffer, size); in TPMU_SIG_SCHEME_Marshal()
7060 (TPMS_SIG_SCHEME_RSAPSS*)&source->rsapss, buffer, size); in TPMU_SIG_SCHEME_Marshal()
7065 (TPMS_SIG_SCHEME_ECDSA*)&source->ecdsa, buffer, size); in TPMU_SIG_SCHEME_Marshal()
7070 (TPMS_SIG_SCHEME_ECDAA*)&source->ecdaa, buffer, size); in TPMU_SIG_SCHEME_Marshal()
7075 buffer, size); in TPMU_SIG_SCHEME_Marshal()
7080 (TPMS_SIG_SCHEME_ECSCHNORR*)&source->ecschnorr, buffer, size); in TPMU_SIG_SCHEME_Marshal()
7084 return TPMS_SCHEME_HMAC_Marshal((TPMS_SCHEME_HMAC*)&source->hmac, buffer, in TPMU_SIG_SCHEME_Marshal()
7096 BYTE** buffer, in TPMU_SIG_SCHEME_Unmarshal() argument
7103 (TPMS_SIG_SCHEME_RSASSA*)&target->rsassa, buffer, size); in TPMU_SIG_SCHEME_Unmarshal()
7108 (TPMS_SIG_SCHEME_RSAPSS*)&target->rsapss, buffer, size); in TPMU_SIG_SCHEME_Unmarshal()
7113 (TPMS_SIG_SCHEME_ECDSA*)&target->ecdsa, buffer, size); in TPMU_SIG_SCHEME_Unmarshal()
7118 (TPMS_SIG_SCHEME_ECDAA*)&target->ecdaa, buffer, size); in TPMU_SIG_SCHEME_Unmarshal()
7123 buffer, size); in TPMU_SIG_SCHEME_Unmarshal()
7128 (TPMS_SIG_SCHEME_ECSCHNORR*)&target->ecschnorr, buffer, size); in TPMU_SIG_SCHEME_Unmarshal()
7133 buffer, size); in TPMU_SIG_SCHEME_Unmarshal()
7144 BYTE** buffer, in TPMT_SIG_SCHEME_Marshal() argument
7147 total_size += TPMI_ALG_SIG_SCHEME_Marshal(&source->scheme, buffer, size); in TPMT_SIG_SCHEME_Marshal()
7149 TPMU_SIG_SCHEME_Marshal(&source->details, buffer, size, source->scheme); in TPMT_SIG_SCHEME_Marshal()
7154 BYTE** buffer, in TPMT_SIG_SCHEME_Unmarshal() argument
7157 result = TPMI_ALG_SIG_SCHEME_Unmarshal(&target->scheme, buffer, size, TRUE); in TPMT_SIG_SCHEME_Unmarshal()
7162 TPMU_SIG_SCHEME_Unmarshal(&target->details, buffer, size, target->scheme); in TPMT_SIG_SCHEME_Unmarshal()
7169 UINT16 TPMT_SYM_DEF_Marshal(TPMT_SYM_DEF* source, BYTE** buffer, INT32* size) { in TPMT_SYM_DEF_Marshal() argument
7171 total_size += TPMI_ALG_SYM_Marshal(&source->algorithm, buffer, size); in TPMT_SYM_DEF_Marshal()
7172 total_size += TPMU_SYM_KEY_BITS_Marshal(&source->keyBits, buffer, size, in TPMT_SYM_DEF_Marshal()
7175 TPMU_SYM_MODE_Marshal(&source->mode, buffer, size, source->algorithm); in TPMT_SYM_DEF_Marshal()
7180 BYTE** buffer, in TPMT_SYM_DEF_Unmarshal() argument
7183 result = TPMI_ALG_SYM_Unmarshal(&target->algorithm, buffer, size, TRUE); in TPMT_SYM_DEF_Unmarshal()
7187 result = TPMU_SYM_KEY_BITS_Unmarshal(&target->keyBits, buffer, size, in TPMT_SYM_DEF_Unmarshal()
7193 TPMU_SYM_MODE_Unmarshal(&target->mode, buffer, size, target->algorithm); in TPMT_SYM_DEF_Unmarshal()
7200 UINT16 TPM_ST_Marshal(TPM_ST* source, BYTE** buffer, INT32* size) { in TPM_ST_Marshal() argument
7201 return uint16_t_Marshal(source, buffer, size); in TPM_ST_Marshal()
7204 TPM_RC TPM_ST_Unmarshal(TPM_ST* target, BYTE** buffer, INT32* size) { in TPM_ST_Unmarshal() argument
7206 result = uint16_t_Unmarshal(target, buffer, size); in TPM_ST_Unmarshal()
7264 UINT16 TPMT_TK_AUTH_Marshal(TPMT_TK_AUTH* source, BYTE** buffer, INT32* size) { in TPMT_TK_AUTH_Marshal() argument
7266 total_size += TPM_ST_Marshal(&source->tag, buffer, size); in TPMT_TK_AUTH_Marshal()
7267 total_size += TPMI_RH_HIERARCHY_Marshal(&source->hierarchy, buffer, size); in TPMT_TK_AUTH_Marshal()
7268 total_size += TPM2B_DIGEST_Marshal(&source->digest, buffer, size); in TPMT_TK_AUTH_Marshal()
7273 BYTE** buffer, in TPMT_TK_AUTH_Unmarshal() argument
7276 result = TPM_ST_Unmarshal(&target->tag, buffer, size); in TPMT_TK_AUTH_Unmarshal()
7280 result = TPMI_RH_HIERARCHY_Unmarshal(&target->hierarchy, buffer, size, TRUE); in TPMT_TK_AUTH_Unmarshal()
7284 result = TPM2B_DIGEST_Unmarshal(&target->digest, buffer, size); in TPMT_TK_AUTH_Unmarshal()
7292 BYTE** buffer, in TPMT_TK_CREATION_Marshal() argument
7295 total_size += TPM_ST_Marshal(&source->tag, buffer, size); in TPMT_TK_CREATION_Marshal()
7296 total_size += TPMI_RH_HIERARCHY_Marshal(&source->hierarchy, buffer, size); in TPMT_TK_CREATION_Marshal()
7297 total_size += TPM2B_DIGEST_Marshal(&source->digest, buffer, size); in TPMT_TK_CREATION_Marshal()
7302 BYTE** buffer, in TPMT_TK_CREATION_Unmarshal() argument
7305 result = TPM_ST_Unmarshal(&target->tag, buffer, size); in TPMT_TK_CREATION_Unmarshal()
7309 result = TPMI_RH_HIERARCHY_Unmarshal(&target->hierarchy, buffer, size, TRUE); in TPMT_TK_CREATION_Unmarshal()
7313 result = TPM2B_DIGEST_Unmarshal(&target->digest, buffer, size); in TPMT_TK_CREATION_Unmarshal()
7321 BYTE** buffer, in TPMT_TK_HASHCHECK_Marshal() argument
7324 total_size += TPM_ST_Marshal(&source->tag, buffer, size); in TPMT_TK_HASHCHECK_Marshal()
7325 total_size += TPMI_RH_HIERARCHY_Marshal(&source->hierarchy, buffer, size); in TPMT_TK_HASHCHECK_Marshal()
7326 total_size += TPM2B_DIGEST_Marshal(&source->digest, buffer, size); in TPMT_TK_HASHCHECK_Marshal()
7331 BYTE** buffer, in TPMT_TK_HASHCHECK_Unmarshal() argument
7334 result = TPM_ST_Unmarshal(&target->tag, buffer, size); in TPMT_TK_HASHCHECK_Unmarshal()
7338 result = TPMI_RH_HIERARCHY_Unmarshal(&target->hierarchy, buffer, size, TRUE); in TPMT_TK_HASHCHECK_Unmarshal()
7342 result = TPM2B_DIGEST_Unmarshal(&target->digest, buffer, size); in TPMT_TK_HASHCHECK_Unmarshal()
7350 BYTE** buffer, in TPMT_TK_VERIFIED_Marshal() argument
7353 total_size += TPM_ST_Marshal(&source->tag, buffer, size); in TPMT_TK_VERIFIED_Marshal()
7354 total_size += TPMI_RH_HIERARCHY_Marshal(&source->hierarchy, buffer, size); in TPMT_TK_VERIFIED_Marshal()
7355 total_size += TPM2B_DIGEST_Marshal(&source->digest, buffer, size); in TPMT_TK_VERIFIED_Marshal()
7360 BYTE** buffer, in TPMT_TK_VERIFIED_Unmarshal() argument
7363 result = TPM_ST_Unmarshal(&target->tag, buffer, size); in TPMT_TK_VERIFIED_Unmarshal()
7367 result = TPMI_RH_HIERARCHY_Unmarshal(&target->hierarchy, buffer, size, TRUE); in TPMT_TK_VERIFIED_Unmarshal()
7371 result = TPM2B_DIGEST_Unmarshal(&target->digest, buffer, size); in TPMT_TK_VERIFIED_Unmarshal()
7379 BYTE** buffer, in TPMU_SYM_DETAILS_Marshal() argument
7408 BYTE** buffer, in TPMU_SYM_DETAILS_Unmarshal() argument
7437 BYTE** buffer, in TPM_ALGORITHM_ID_Marshal() argument
7439 return uint32_t_Marshal(source, buffer, size); in TPM_ALGORITHM_ID_Marshal()
7443 BYTE** buffer, in TPM_ALGORITHM_ID_Unmarshal() argument
7445 return uint32_t_Unmarshal(target, buffer, size); in TPM_ALGORITHM_ID_Unmarshal()
7449 BYTE** buffer, in TPM_AUTHORIZATION_SIZE_Marshal() argument
7451 return uint32_t_Marshal(source, buffer, size); in TPM_AUTHORIZATION_SIZE_Marshal()
7455 BYTE** buffer, in TPM_AUTHORIZATION_SIZE_Unmarshal() argument
7457 return uint32_t_Unmarshal(target, buffer, size); in TPM_AUTHORIZATION_SIZE_Unmarshal()
7461 BYTE** buffer, in TPM_CLOCK_ADJUST_Marshal() argument
7463 return int8_t_Marshal(source, buffer, size); in TPM_CLOCK_ADJUST_Marshal()
7467 BYTE** buffer, in TPM_CLOCK_ADJUST_Unmarshal() argument
7470 result = int8_t_Unmarshal(target, buffer, size); in TPM_CLOCK_ADJUST_Unmarshal()
7498 UINT16 TPM_EO_Marshal(TPM_EO* source, BYTE** buffer, INT32* size) { in TPM_EO_Marshal() argument
7499 return uint16_t_Marshal(source, buffer, size); in TPM_EO_Marshal()
7502 TPM_RC TPM_EO_Unmarshal(TPM_EO* target, BYTE** buffer, INT32* size) { in TPM_EO_Unmarshal() argument
7504 result = uint16_t_Unmarshal(target, buffer, size); in TPM_EO_Unmarshal()
7547 UINT16 TPM_HC_Marshal(TPM_HC* source, BYTE** buffer, INT32* size) { in TPM_HC_Marshal() argument
7548 return uint32_t_Marshal(source, buffer, size); in TPM_HC_Marshal()
7551 TPM_RC TPM_HC_Unmarshal(TPM_HC* target, BYTE** buffer, INT32* size) { in TPM_HC_Unmarshal() argument
7553 result = uint32_t_Unmarshal(target, buffer, size); in TPM_HC_Unmarshal()
7647 UINT16 TPM_HT_Marshal(TPM_HT* source, BYTE** buffer, INT32* size) { in TPM_HT_Marshal() argument
7648 return uint8_t_Marshal(source, buffer, size); in TPM_HT_Marshal()
7651 TPM_RC TPM_HT_Unmarshal(TPM_HT* target, BYTE** buffer, INT32* size) { in TPM_HT_Unmarshal() argument
7653 result = uint8_t_Unmarshal(target, buffer, size); in TPM_HT_Unmarshal()
7687 UINT16 TPM_KEY_SIZE_Marshal(TPM_KEY_SIZE* source, BYTE** buffer, INT32* size) { in TPM_KEY_SIZE_Marshal() argument
7688 return uint16_t_Marshal(source, buffer, size); in TPM_KEY_SIZE_Marshal()
7692 BYTE** buffer, in TPM_KEY_SIZE_Unmarshal() argument
7694 return uint16_t_Unmarshal(target, buffer, size); in TPM_KEY_SIZE_Unmarshal()
7698 BYTE** buffer, in TPM_MODIFIER_INDICATOR_Marshal() argument
7700 return uint32_t_Marshal(source, buffer, size); in TPM_MODIFIER_INDICATOR_Marshal()
7704 BYTE** buffer, in TPM_MODIFIER_INDICATOR_Unmarshal() argument
7706 return uint32_t_Unmarshal(target, buffer, size); in TPM_MODIFIER_INDICATOR_Unmarshal()
7709 UINT16 TPM_NV_INDEX_Marshal(TPM_NV_INDEX* source, BYTE** buffer, INT32* size) { in TPM_NV_INDEX_Marshal() argument
7710 return uint32_t_Marshal((uint32_t*)source, buffer, size); in TPM_NV_INDEX_Marshal()
7714 BYTE** buffer, in TPM_NV_INDEX_Unmarshal() argument
7717 result = uint32_t_Unmarshal((uint32_t*)target, buffer, size); in TPM_NV_INDEX_Unmarshal()
7725 BYTE** buffer, in TPM_PARAMETER_SIZE_Marshal() argument
7727 return uint32_t_Marshal(source, buffer, size); in TPM_PARAMETER_SIZE_Marshal()
7731 BYTE** buffer, in TPM_PARAMETER_SIZE_Unmarshal() argument
7733 return uint32_t_Unmarshal(target, buffer, size); in TPM_PARAMETER_SIZE_Unmarshal()
7736 UINT16 TPM_PS_Marshal(TPM_PS* source, BYTE** buffer, INT32* size) { in TPM_PS_Marshal() argument
7737 return uint32_t_Marshal(source, buffer, size); in TPM_PS_Marshal()
7740 TPM_RC TPM_PS_Unmarshal(TPM_PS* target, BYTE** buffer, INT32* size) { in TPM_PS_Unmarshal() argument
7742 result = uint32_t_Unmarshal(target, buffer, size); in TPM_PS_Unmarshal()
7797 UINT16 TPM_PT_PCR_Marshal(TPM_PT_PCR* source, BYTE** buffer, INT32* size) { in TPM_PT_PCR_Marshal() argument
7798 return uint32_t_Marshal(source, buffer, size); in TPM_PT_PCR_Marshal()
7801 TPM_RC TPM_PT_PCR_Unmarshal(TPM_PT_PCR* target, BYTE** buffer, INT32* size) { in TPM_PT_PCR_Unmarshal() argument
7803 result = uint32_t_Unmarshal(target, buffer, size); in TPM_PT_PCR_Unmarshal()
7861 UINT16 TPM_RC_Marshal(TPM_RC* source, BYTE** buffer, INT32* size) { in TPM_RC_Marshal() argument
7862 return uint32_t_Marshal(source, buffer, size); in TPM_RC_Marshal()
7865 TPM_RC TPM_RC_Unmarshal(TPM_RC* target, BYTE** buffer, INT32* size) { in TPM_RC_Unmarshal() argument
7867 result = uint32_t_Unmarshal(target, buffer, size); in TPM_RC_Unmarshal()
8237 UINT16 TPM_RH_Marshal(TPM_RH* source, BYTE** buffer, INT32* size) { in TPM_RH_Marshal() argument
8238 return uint32_t_Marshal(source, buffer, size); in TPM_RH_Marshal()
8241 TPM_RC TPM_RH_Unmarshal(TPM_RH* target, BYTE** buffer, INT32* size) { in TPM_RH_Unmarshal() argument
8243 result = uint32_t_Unmarshal(target, buffer, size); in TPM_RH_Unmarshal()
8304 UINT16 TPM_SE_Marshal(TPM_SE* source, BYTE** buffer, INT32* size) { in TPM_SE_Marshal() argument
8305 return uint8_t_Marshal(source, buffer, size); in TPM_SE_Marshal()
8308 TPM_RC TPM_SE_Unmarshal(TPM_SE* target, BYTE** buffer, INT32* size) { in TPM_SE_Unmarshal() argument
8310 result = uint8_t_Unmarshal(target, buffer, size); in TPM_SE_Unmarshal()
8326 UINT16 TPM_SPEC_Marshal(TPM_SPEC* source, BYTE** buffer, INT32* size) { in TPM_SPEC_Marshal() argument
8327 return uint32_t_Marshal(source, buffer, size); in TPM_SPEC_Marshal()
8330 TPM_RC TPM_SPEC_Unmarshal(TPM_SPEC* target, BYTE** buffer, INT32* size) { in TPM_SPEC_Unmarshal() argument
8332 result = uint32_t_Unmarshal(target, buffer, size); in TPM_SPEC_Unmarshal()
8354 UINT16 TPM_SU_Marshal(TPM_SU* source, BYTE** buffer, INT32* size) { in TPM_SU_Marshal() argument
8355 return uint16_t_Marshal(source, buffer, size); in TPM_SU_Marshal()
8358 TPM_RC TPM_SU_Unmarshal(TPM_SU* target, BYTE** buffer, INT32* size) { in TPM_SU_Unmarshal() argument
8360 result = uint16_t_Unmarshal(target, buffer, size); in TPM_SU_Unmarshal()
8373 UINT16 _ID_OBJECT_Marshal(_ID_OBJECT* source, BYTE** buffer, INT32* size) { in _ID_OBJECT_Marshal() argument
8375 total_size += TPM2B_DIGEST_Marshal(&source->integrityHMAC, buffer, size); in _ID_OBJECT_Marshal()
8376 total_size += TPM2B_DIGEST_Marshal(&source->encIdentity, buffer, size); in _ID_OBJECT_Marshal()
8380 TPM_RC _ID_OBJECT_Unmarshal(_ID_OBJECT* target, BYTE** buffer, INT32* size) { in _ID_OBJECT_Unmarshal() argument
8382 result = TPM2B_DIGEST_Unmarshal(&target->integrityHMAC, buffer, size); in _ID_OBJECT_Unmarshal()
8386 result = TPM2B_DIGEST_Unmarshal(&target->encIdentity, buffer, size); in _ID_OBJECT_Unmarshal()
8393 UINT16 _PRIVATE_Marshal(_PRIVATE* source, BYTE** buffer, INT32* size) { in _PRIVATE_Marshal() argument
8395 total_size += TPM2B_DIGEST_Marshal(&source->integrityOuter, buffer, size); in _PRIVATE_Marshal()
8396 total_size += TPM2B_DIGEST_Marshal(&source->integrityInner, buffer, size); in _PRIVATE_Marshal()
8397 total_size += TPMT_SENSITIVE_Marshal(&source->sensitive, buffer, size); in _PRIVATE_Marshal()
8401 TPM_RC _PRIVATE_Unmarshal(_PRIVATE* target, BYTE** buffer, INT32* size) { in _PRIVATE_Unmarshal() argument
8403 result = TPM2B_DIGEST_Unmarshal(&target->integrityOuter, buffer, size); in _PRIVATE_Unmarshal()
8407 result = TPM2B_DIGEST_Unmarshal(&target->integrityInner, buffer, size); in _PRIVATE_Unmarshal()
8411 result = TPMT_SENSITIVE_Unmarshal(&target->sensitive, buffer, size); in _PRIVATE_Unmarshal()