Lines Matching refs:size
9 UINT16 uint8_t_Marshal(uint8_t* source, BYTE** buffer, INT32* size) { in uint8_t_Marshal() argument
11 if (!size || *size < sizeof(uint8_t)) { in uint8_t_Marshal()
29 *size -= 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
35 if (!size || *size < sizeof(uint8_t)) { in uint8_t_Unmarshal()
53 *size -= sizeof(uint8_t); in uint8_t_Unmarshal()
57 UINT16 int8_t_Marshal(int8_t* source, BYTE** buffer, INT32* size) { in int8_t_Marshal() argument
59 if (!size || *size < sizeof(int8_t)) { in int8_t_Marshal()
77 *size -= 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
83 if (!size || *size < sizeof(int8_t)) { in int8_t_Unmarshal()
101 *size -= sizeof(int8_t); in int8_t_Unmarshal()
105 UINT16 uint16_t_Marshal(uint16_t* source, BYTE** buffer, INT32* size) { in uint16_t_Marshal() argument
107 if (!size || *size < sizeof(uint16_t)) { in uint16_t_Marshal()
125 *size -= 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
131 if (!size || *size < sizeof(uint16_t)) { in uint16_t_Unmarshal()
149 *size -= sizeof(uint16_t); in uint16_t_Unmarshal()
153 UINT16 int16_t_Marshal(int16_t* source, BYTE** buffer, INT32* size) { in int16_t_Marshal() argument
155 if (!size || *size < sizeof(int16_t)) { in int16_t_Marshal()
173 *size -= 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
179 if (!size || *size < sizeof(int16_t)) { in int16_t_Unmarshal()
197 *size -= sizeof(int16_t); in int16_t_Unmarshal()
201 UINT16 uint32_t_Marshal(uint32_t* source, BYTE** buffer, INT32* size) { in uint32_t_Marshal() argument
203 if (!size || *size < sizeof(uint32_t)) { in uint32_t_Marshal()
221 *size -= 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
227 if (!size || *size < sizeof(uint32_t)) { in uint32_t_Unmarshal()
245 *size -= sizeof(uint32_t); in uint32_t_Unmarshal()
249 UINT16 int32_t_Marshal(int32_t* source, BYTE** buffer, INT32* size) { in int32_t_Marshal() argument
251 if (!size || *size < sizeof(int32_t)) { in int32_t_Marshal()
269 *size -= 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
275 if (!size || *size < sizeof(int32_t)) { in int32_t_Unmarshal()
293 *size -= sizeof(int32_t); in int32_t_Unmarshal()
297 UINT16 uint64_t_Marshal(uint64_t* source, BYTE** buffer, INT32* size) { in uint64_t_Marshal() argument
299 if (!size || *size < sizeof(uint64_t)) { in uint64_t_Marshal()
317 *size -= 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
323 if (!size || *size < sizeof(uint64_t)) { in uint64_t_Unmarshal()
341 *size -= sizeof(uint64_t); in uint64_t_Unmarshal()
345 UINT16 int64_t_Marshal(int64_t* source, BYTE** buffer, INT32* size) { in int64_t_Marshal() argument
347 if (!size || *size < sizeof(int64_t)) { in int64_t_Marshal()
365 *size -= 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
371 if (!size || *size < sizeof(int64_t)) { in int64_t_Unmarshal()
389 *size -= 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()
445 for (i = 0; i < source->t.size; ++i) { in TPM2B_ATTEST_Marshal()
446 total_size += BYTE_Marshal(&source->t.attestationData[i], buffer, size); in TPM2B_ATTEST_Marshal()
453 INT32* size) { in TPM2B_ATTEST_Unmarshal() argument
456 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_ATTEST_Unmarshal()
460 if (target->t.size == 0) { in TPM2B_ATTEST_Unmarshal()
463 if (target->t.size > sizeof(TPMS_ATTEST)) { in TPM2B_ATTEST_Unmarshal()
466 for (i = 0; i < target->t.size; ++i) { 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()
479 for (i = 0; i < source->t.size; ++i) { in TPM2B_DIGEST_Marshal()
480 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_DIGEST_Marshal()
487 INT32* size) { in TPM2B_DIGEST_Unmarshal() argument
490 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_DIGEST_Unmarshal()
494 if (target->t.size == 0) { in TPM2B_DIGEST_Unmarshal()
497 if (target->t.size > sizeof(TPMU_HA)) { in TPM2B_DIGEST_Unmarshal()
500 for (i = 0; i < target->t.size; ++i) { 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()
519 INT32* size) { in TPM2B_CONTEXT_DATA_Marshal() argument
522 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_CONTEXT_DATA_Marshal()
523 for (i = 0; i < source->t.size; ++i) { in TPM2B_CONTEXT_DATA_Marshal()
524 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_CONTEXT_DATA_Marshal()
531 INT32* size) { in TPM2B_CONTEXT_DATA_Unmarshal() argument
534 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_CONTEXT_DATA_Unmarshal()
538 if (target->t.size == 0) { in TPM2B_CONTEXT_DATA_Unmarshal()
541 if (target->t.size > sizeof(TPMS_CONTEXT_DATA)) { in TPM2B_CONTEXT_DATA_Unmarshal()
544 for (i = 0; i < target->t.size; ++i) { in TPM2B_CONTEXT_DATA_Unmarshal()
545 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_CONTEXT_DATA_Unmarshal()
555 INT32* size) { in TPM2B_CONTEXT_SENSITIVE_Marshal() argument
558 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_CONTEXT_SENSITIVE_Marshal()
559 for (i = 0; i < source->t.size; ++i) { in TPM2B_CONTEXT_SENSITIVE_Marshal()
560 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_CONTEXT_SENSITIVE_Marshal()
567 INT32* size) { in TPM2B_CONTEXT_SENSITIVE_Unmarshal() argument
570 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_CONTEXT_SENSITIVE_Unmarshal()
574 if (target->t.size == 0) { in TPM2B_CONTEXT_SENSITIVE_Unmarshal()
577 if (target->t.size > MAX_CONTEXT_SIZE) { in TPM2B_CONTEXT_SENSITIVE_Unmarshal()
580 for (i = 0; i < target->t.size; ++i) { 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()
786 for (i = 0; i < source->t.size; ++i) { 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()
799 if (target->t.size == 0) { in TPM2B_DATA_Unmarshal()
802 if (target->t.size > sizeof(TPMT_HA)) { in TPM2B_DATA_Unmarshal()
805 for (i = 0; i < target->t.size; ++i) { in TPM2B_DATA_Unmarshal()
806 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_DATA_Unmarshal()
816 INT32* size) { in TPMA_LOCALITY_Marshal() argument
817 return uint8_t_Marshal((uint8_t*)source, buffer, size); in TPMA_LOCALITY_Marshal()
822 INT32* size) { 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()
835 for (i = 0; i < source->t.size; ++i) { 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()
848 if (target->t.size == 0) { in TPM2B_NAME_Unmarshal()
851 if (target->t.size > sizeof(TPMU_NAME)) { in TPM2B_NAME_Unmarshal()
854 for (i = 0; i < target->t.size; ++i) { in TPM2B_NAME_Unmarshal()
855 result = BYTE_Unmarshal(&target->t.name[i], buffer, size); in TPM2B_NAME_Unmarshal()
865 INT32* size) { in TPMI_ALG_HASH_Marshal() argument
866 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_HASH_Marshal()
871 INT32* size, 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()
920 INT32* size) { 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()
933 INT32* size) { 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()
969 INT32* size) { 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()
982 INT32* size) { 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()
1004 INT32* size) { 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()
1018 INT32* size) { 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()
1053 INT32* size) { 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()
1069 INT32* size) { in TPM2B_CREATION_DATA_Unmarshal() argument
1071 UINT32 start_size = *size; in TPM2B_CREATION_DATA_Unmarshal()
1073 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_CREATION_DATA_Unmarshal()
1077 if (target->t.size == 0) { in TPM2B_CREATION_DATA_Unmarshal()
1080 result = TPMS_CREATION_DATA_Unmarshal(&target->t.creationData, buffer, size); in TPM2B_CREATION_DATA_Unmarshal()
1084 struct_size = start_size - *size - sizeof(target->t.size); in TPM2B_CREATION_DATA_Unmarshal()
1085 if (struct_size != target->t.size) { in TPM2B_CREATION_DATA_Unmarshal()
1093 INT32* size) { in TPM2B_DIGEST_VALUES_Marshal() argument
1096 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_DIGEST_VALUES_Marshal()
1097 for (i = 0; i < source->t.size; ++i) { in TPM2B_DIGEST_VALUES_Marshal()
1098 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_DIGEST_VALUES_Marshal()
1105 INT32* size) { in TPM2B_DIGEST_VALUES_Unmarshal() argument
1108 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_DIGEST_VALUES_Unmarshal()
1112 if (target->t.size == 0) { in TPM2B_DIGEST_VALUES_Unmarshal()
1115 if (target->t.size > sizeof(TPML_DIGEST_VALUES)) { in TPM2B_DIGEST_VALUES_Unmarshal()
1118 for (i = 0; i < target->t.size; ++i) { in TPM2B_DIGEST_VALUES_Unmarshal()
1119 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_DIGEST_VALUES_Unmarshal()
1129 INT32* size) { in TPM2B_ECC_PARAMETER_Marshal() argument
1132 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_ECC_PARAMETER_Marshal()
1133 for (i = 0; i < source->t.size; ++i) { in TPM2B_ECC_PARAMETER_Marshal()
1134 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_ECC_PARAMETER_Marshal()
1141 INT32* size) { in TPM2B_ECC_PARAMETER_Unmarshal() argument
1144 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_ECC_PARAMETER_Unmarshal()
1148 if (target->t.size == 0) { in TPM2B_ECC_PARAMETER_Unmarshal()
1151 if (target->t.size > MAX_ECC_KEY_BYTES) { in TPM2B_ECC_PARAMETER_Unmarshal()
1154 for (i = 0; i < target->t.size; ++i) { in TPM2B_ECC_PARAMETER_Unmarshal()
1155 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_ECC_PARAMETER_Unmarshal()
1165 INT32* size) { 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()
1174 INT32* size) { 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()
1189 INT32* size) { 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()
1204 INT32* size) { in TPM2B_ECC_POINT_Unmarshal() argument
1206 UINT32 start_size = *size; in TPM2B_ECC_POINT_Unmarshal()
1208 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_ECC_POINT_Unmarshal()
1212 if (target->t.size == 0) { in TPM2B_ECC_POINT_Unmarshal()
1215 result = TPMS_ECC_POINT_Unmarshal(&target->t.point, buffer, size); in TPM2B_ECC_POINT_Unmarshal()
1219 struct_size = start_size - *size - sizeof(target->t.size); in TPM2B_ECC_POINT_Unmarshal()
1220 if (struct_size != target->t.size) { in TPM2B_ECC_POINT_Unmarshal()
1228 INT32* size) { in TPM2B_ENCRYPTED_SECRET_Marshal() argument
1231 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_ENCRYPTED_SECRET_Marshal()
1232 for (i = 0; i < source->t.size; ++i) { in TPM2B_ENCRYPTED_SECRET_Marshal()
1233 total_size += BYTE_Marshal(&source->t.secret[i], buffer, size); in TPM2B_ENCRYPTED_SECRET_Marshal()
1240 INT32* size) { in TPM2B_ENCRYPTED_SECRET_Unmarshal() argument
1243 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_ENCRYPTED_SECRET_Unmarshal()
1247 if (target->t.size == 0) { in TPM2B_ENCRYPTED_SECRET_Unmarshal()
1250 if (target->t.size > sizeof(TPMU_ENCRYPTED_SECRET)) { in TPM2B_ENCRYPTED_SECRET_Unmarshal()
1253 for (i = 0; i < target->t.size; ++i) { 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()
1266 for (i = 0; i < source->t.size; ++i) { 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()
1279 if (target->t.size == 0) { in TPM2B_EVENT_Unmarshal()
1282 if (target->t.size > 1024) { in TPM2B_EVENT_Unmarshal()
1285 for (i = 0; i < target->t.size; ++i) { in TPM2B_EVENT_Unmarshal()
1286 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_EVENT_Unmarshal()
1296 INT32* size) { in TPM2B_ID_OBJECT_Marshal() argument
1299 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_ID_OBJECT_Marshal()
1300 for (i = 0; i < source->t.size; ++i) { in TPM2B_ID_OBJECT_Marshal()
1301 total_size += BYTE_Marshal(&source->t.credential[i], buffer, size); in TPM2B_ID_OBJECT_Marshal()
1308 INT32* size) { in TPM2B_ID_OBJECT_Unmarshal() argument
1311 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_ID_OBJECT_Unmarshal()
1315 if (target->t.size == 0) { in TPM2B_ID_OBJECT_Unmarshal()
1318 if (target->t.size > sizeof(_ID_OBJECT)) { in TPM2B_ID_OBJECT_Unmarshal()
1321 for (i = 0; i < target->t.size; ++i) { 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()
1334 for (i = 0; i < source->t.size; ++i) { 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()
1347 if (target->t.size == 0) { in TPM2B_IV_Unmarshal()
1350 if (target->t.size > MAX_SYM_BLOCK_SIZE) { in TPM2B_IV_Unmarshal()
1353 for (i = 0; i < target->t.size; ++i) { in TPM2B_IV_Unmarshal()
1354 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_IV_Unmarshal()
1364 INT32* size) { in TPM2B_MAX_BUFFER_Marshal() argument
1367 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_MAX_BUFFER_Marshal()
1368 for (i = 0; i < source->t.size; ++i) { in TPM2B_MAX_BUFFER_Marshal()
1369 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_MAX_BUFFER_Marshal()
1376 INT32* size) { in TPM2B_MAX_BUFFER_Unmarshal() argument
1379 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_MAX_BUFFER_Unmarshal()
1383 if (target->t.size == 0) { in TPM2B_MAX_BUFFER_Unmarshal()
1386 if (target->t.size > MAX_DIGEST_BUFFER) { in TPM2B_MAX_BUFFER_Unmarshal()
1389 for (i = 0; i < target->t.size; ++i) { in TPM2B_MAX_BUFFER_Unmarshal()
1390 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_MAX_BUFFER_Unmarshal()
1400 INT32* size) { in TPM2B_MAX_NV_BUFFER_Marshal() argument
1403 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_MAX_NV_BUFFER_Marshal()
1404 for (i = 0; i < source->t.size; ++i) { in TPM2B_MAX_NV_BUFFER_Marshal()
1405 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_MAX_NV_BUFFER_Marshal()
1412 INT32* size) { in TPM2B_MAX_NV_BUFFER_Unmarshal() argument
1415 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_MAX_NV_BUFFER_Unmarshal()
1419 if (target->t.size == 0) { in TPM2B_MAX_NV_BUFFER_Unmarshal()
1422 if (target->t.size > MAX_NV_BUFFER_SIZE) { in TPM2B_MAX_NV_BUFFER_Unmarshal()
1425 for (i = 0; i < target->t.size; ++i) { 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()
1444 INT32* size) { in TPMI_RH_NV_INDEX_Marshal() argument
1445 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_NV_INDEX_Marshal()
1450 INT32* size) { 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()
1487 INT32* size) { 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()
1499 INT32* size) { 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()
1529 INT32* size) { 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()
1544 INT32* size) { in TPM2B_NV_PUBLIC_Unmarshal() argument
1546 UINT32 start_size = *size; in TPM2B_NV_PUBLIC_Unmarshal()
1548 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_NV_PUBLIC_Unmarshal()
1552 if (target->t.size == 0) { in TPM2B_NV_PUBLIC_Unmarshal()
1555 result = TPMS_NV_PUBLIC_Unmarshal(&target->t.nvPublic, buffer, size); in TPM2B_NV_PUBLIC_Unmarshal()
1559 struct_size = start_size - *size - sizeof(target->t.size); in TPM2B_NV_PUBLIC_Unmarshal()
1560 if (struct_size != target->t.size) { in TPM2B_NV_PUBLIC_Unmarshal()
1568 INT32* size) { in TPM2B_OPERAND_Marshal() argument
1569 return TPM2B_DIGEST_Marshal(source, buffer, size); in TPM2B_OPERAND_Marshal()
1574 INT32* size) { in TPM2B_OPERAND_Unmarshal() argument
1575 return TPM2B_DIGEST_Unmarshal(target, buffer, size); in TPM2B_OPERAND_Unmarshal()
1580 INT32* size) { in TPM2B_PRIVATE_Marshal() argument
1583 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_PRIVATE_Marshal()
1584 for (i = 0; i < source->t.size; ++i) { in TPM2B_PRIVATE_Marshal()
1585 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_PRIVATE_Marshal()
1592 INT32* size) { in TPM2B_PRIVATE_Unmarshal() argument
1595 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_PRIVATE_Unmarshal()
1599 if (target->t.size == 0) { in TPM2B_PRIVATE_Unmarshal()
1602 if (target->t.size > sizeof(_PRIVATE)) { in TPM2B_PRIVATE_Unmarshal()
1605 for (i = 0; i < target->t.size; ++i) { in TPM2B_PRIVATE_Unmarshal()
1606 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_PRIVATE_Unmarshal()
1616 INT32* size) { in TPM2B_PRIVATE_KEY_RSA_Marshal() argument
1619 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_PRIVATE_KEY_RSA_Marshal()
1620 for (i = 0; i < source->t.size; ++i) { in TPM2B_PRIVATE_KEY_RSA_Marshal()
1621 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_PRIVATE_KEY_RSA_Marshal()
1628 INT32* size) { in TPM2B_PRIVATE_KEY_RSA_Unmarshal() argument
1631 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_PRIVATE_KEY_RSA_Unmarshal()
1635 if (target->t.size == 0) { in TPM2B_PRIVATE_KEY_RSA_Unmarshal()
1638 if (target->t.size > MAX_RSA_KEY_BYTES / 2) { in TPM2B_PRIVATE_KEY_RSA_Unmarshal()
1641 for (i = 0; i < target->t.size; ++i) { in TPM2B_PRIVATE_KEY_RSA_Unmarshal()
1642 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_PRIVATE_KEY_RSA_Unmarshal()
1653 INT32* size) { in TPM2B_PRIVATE_VENDOR_SPECIFIC_Marshal() argument
1656 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_PRIVATE_VENDOR_SPECIFIC_Marshal()
1657 for (i = 0; i < source->t.size; ++i) { in TPM2B_PRIVATE_VENDOR_SPECIFIC_Marshal()
1658 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_PRIVATE_VENDOR_SPECIFIC_Marshal()
1666 INT32* size) { in TPM2B_PRIVATE_VENDOR_SPECIFIC_Unmarshal() argument
1669 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_PRIVATE_VENDOR_SPECIFIC_Unmarshal()
1673 if (target->t.size == 0) { in TPM2B_PRIVATE_VENDOR_SPECIFIC_Unmarshal()
1676 if (target->t.size > PRIVATE_VENDOR_SPECIFIC_BYTES) { in TPM2B_PRIVATE_VENDOR_SPECIFIC_Unmarshal()
1679 for (i = 0; i < target->t.size; ++i) { 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()
1718 INT32* size) { in TPMI_ALG_PUBLIC_Marshal() argument
1719 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_PUBLIC_Marshal()
1724 INT32* size) { in TPMI_ALG_PUBLIC_Unmarshal() argument
1727 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_PUBLIC_Unmarshal()
1755 INT32* size) { in TPM2B_PUBLIC_KEY_RSA_Marshal() argument
1758 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_PUBLIC_KEY_RSA_Marshal()
1759 for (i = 0; i < source->t.size; ++i) { in TPM2B_PUBLIC_KEY_RSA_Marshal()
1760 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_PUBLIC_KEY_RSA_Marshal()
1767 INT32* size) { in TPM2B_PUBLIC_KEY_RSA_Unmarshal() argument
1770 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_PUBLIC_KEY_RSA_Unmarshal()
1774 if (target->t.size == 0) { in TPM2B_PUBLIC_KEY_RSA_Unmarshal()
1777 if (target->t.size > MAX_RSA_KEY_BYTES) { in TPM2B_PUBLIC_KEY_RSA_Unmarshal()
1780 for (i = 0; i < target->t.size; ++i) { in TPM2B_PUBLIC_KEY_RSA_Unmarshal()
1781 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_PUBLIC_KEY_RSA_Unmarshal()
1791 INT32* size, in TPMU_PUBLIC_ID_Marshal() argument
1797 size); 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()
1811 size); in TPMU_PUBLIC_ID_Marshal()
1819 INT32* size, in TPMU_PUBLIC_ID_Unmarshal() argument
1825 size); 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()
1839 size); 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()
1851 INT32* size) { in TPM_KEY_BITS_Unmarshal() argument
1852 return uint16_t_Unmarshal(target, buffer, size); in TPM_KEY_BITS_Unmarshal()
1857 INT32* size) { in TPMI_AES_KEY_BITS_Marshal() argument
1858 return TPM_KEY_BITS_Marshal(source, buffer, size); in TPMI_AES_KEY_BITS_Marshal()
1863 INT32* size) { in TPMI_AES_KEY_BITS_Unmarshal() argument
1869 result = TPM_KEY_BITS_Unmarshal(target, buffer, size); in TPMI_AES_KEY_BITS_Unmarshal()
1887 INT32* size) { in TPMI_SM4_KEY_BITS_Marshal() argument
1888 return TPM_KEY_BITS_Marshal(source, buffer, size); in TPMI_SM4_KEY_BITS_Marshal()
1893 INT32* size) { in TPMI_SM4_KEY_BITS_Unmarshal() argument
1899 result = TPM_KEY_BITS_Unmarshal(target, buffer, size); in TPMI_SM4_KEY_BITS_Unmarshal()
1917 INT32* size) { in TPMI_CAMELLIA_KEY_BITS_Marshal() argument
1918 return TPM_KEY_BITS_Marshal(source, buffer, size); in TPMI_CAMELLIA_KEY_BITS_Marshal()
1923 INT32* size) { in TPMI_CAMELLIA_KEY_BITS_Unmarshal() argument
1929 result = TPM_KEY_BITS_Unmarshal(target, buffer, size); in TPMI_CAMELLIA_KEY_BITS_Unmarshal()
1947 INT32* size, in TPMU_SYM_KEY_BITS_Marshal() argument
1953 size); in TPMU_SYM_KEY_BITS_Marshal()
1958 size); 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()
1979 INT32* size, 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()
2011 INT32* size) { in TPMI_ALG_SYM_MODE_Marshal() argument
2012 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_SYM_MODE_Marshal()
2017 INT32* size, in TPMI_ALG_SYM_MODE_Unmarshal() argument
2021 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_SYM_MODE_Unmarshal()
2055 INT32* size, in TPMU_SYM_MODE_Marshal() argument
2061 size); in TPMU_SYM_MODE_Marshal()
2066 size); in TPMU_SYM_MODE_Marshal()
2071 buffer, size); in TPMU_SYM_MODE_Marshal()
2087 INT32* size, 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()
2117 INT32* size) { in TPMI_ALG_SYM_OBJECT_Marshal() argument
2118 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_SYM_OBJECT_Marshal()
2123 INT32* size, in TPMI_ALG_SYM_OBJECT_Unmarshal() argument
2127 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_SYM_OBJECT_Unmarshal()
2155 INT32* size) { 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()
2167 INT32* size) { 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()
2189 INT32* size) { in TPMI_ALG_RSA_SCHEME_Marshal() argument
2190 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_RSA_SCHEME_Marshal()
2195 INT32* size, in TPMI_ALG_RSA_SCHEME_Unmarshal() argument
2199 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_RSA_SCHEME_Unmarshal()
2230 INT32* size) { in TPMS_SCHEME_HASH_Marshal() argument
2232 total_size += TPMI_ALG_HASH_Marshal(&source->hashAlg, buffer, size); in TPMS_SCHEME_HASH_Marshal()
2238 INT32* size) { in TPMS_SCHEME_HASH_Unmarshal() argument
2240 result = TPMI_ALG_HASH_Unmarshal(&target->hashAlg, buffer, size, FALSE); in TPMS_SCHEME_HASH_Unmarshal()
2249 INT32* size) { in TPMS_SIG_SCHEME_RSAPSS_Marshal() argument
2250 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SIG_SCHEME_RSAPSS_Marshal()
2255 INT32* size) { in TPMS_SIG_SCHEME_RSAPSS_Unmarshal() argument
2256 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SIG_SCHEME_RSAPSS_Unmarshal()
2261 INT32* size) { in TPMS_SIG_SCHEME_SM2_Marshal() argument
2262 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SIG_SCHEME_SM2_Marshal()
2267 INT32* size) { in TPMS_SIG_SCHEME_SM2_Unmarshal() argument
2268 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SIG_SCHEME_SM2_Unmarshal()
2273 INT32* size) { in TPMS_SIG_SCHEME_ECSCHNORR_Marshal() argument
2274 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SIG_SCHEME_ECSCHNORR_Marshal()
2279 INT32* size) { in TPMS_SIG_SCHEME_ECSCHNORR_Unmarshal() argument
2280 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SIG_SCHEME_ECSCHNORR_Unmarshal()
2285 INT32* size) { 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()
2294 INT32* size) { 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()
2309 INT32* size) { in TPMS_SIG_SCHEME_ECDAA_Marshal() argument
2310 return TPMS_SCHEME_ECDAA_Marshal(source, buffer, size); in TPMS_SIG_SCHEME_ECDAA_Marshal()
2315 INT32* size) { in TPMS_SIG_SCHEME_ECDAA_Unmarshal() argument
2316 return TPMS_SCHEME_ECDAA_Unmarshal(target, buffer, size); in TPMS_SIG_SCHEME_ECDAA_Unmarshal()
2321 INT32* size) { in TPMS_KEY_SCHEME_ECDH_Marshal() argument
2322 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_KEY_SCHEME_ECDH_Marshal()
2327 INT32* size) { in TPMS_KEY_SCHEME_ECDH_Unmarshal() argument
2328 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_KEY_SCHEME_ECDH_Unmarshal()
2333 INT32* size) { in TPMS_KEY_SCHEME_ECMQV_Marshal() argument
2334 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_KEY_SCHEME_ECMQV_Marshal()
2339 INT32* size) { in TPMS_KEY_SCHEME_ECMQV_Unmarshal() argument
2340 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_KEY_SCHEME_ECMQV_Unmarshal()
2345 INT32* size) { in TPMS_SIG_SCHEME_RSASSA_Marshal() argument
2346 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SIG_SCHEME_RSASSA_Marshal()
2351 INT32* size) { in TPMS_SIG_SCHEME_RSASSA_Unmarshal() argument
2352 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SIG_SCHEME_RSASSA_Unmarshal()
2357 INT32* size) { in TPMS_ENC_SCHEME_OAEP_Marshal() argument
2358 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_ENC_SCHEME_OAEP_Marshal()
2363 INT32* size) { 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
2381 INT32* size) { in TPMS_ENC_SCHEME_RSAES_Marshal() argument
2382 return TPMS_EMPTY_Marshal(source, buffer, size); in TPMS_ENC_SCHEME_RSAES_Marshal()
2387 INT32* size) { in TPMS_ENC_SCHEME_RSAES_Unmarshal() argument
2388 return TPMS_EMPTY_Unmarshal(target, buffer, size); in TPMS_ENC_SCHEME_RSAES_Unmarshal()
2393 INT32* size) { in TPMS_SIG_SCHEME_ECDSA_Marshal() argument
2394 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SIG_SCHEME_ECDSA_Marshal()
2399 INT32* size) { in TPMS_SIG_SCHEME_ECDSA_Unmarshal() argument
2400 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SIG_SCHEME_ECDSA_Unmarshal()
2405 INT32* size, 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()
2468 INT32* size, 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()
2531 INT32* size) { 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()
2541 INT32* size) { 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()
2557 INT32* size) { in TPMI_RSA_KEY_BITS_Marshal() argument
2558 return uint16_t_Marshal(source, buffer, size); in TPMI_RSA_KEY_BITS_Marshal()
2563 INT32* size) { in TPMI_RSA_KEY_BITS_Unmarshal() argument
2569 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_RSA_KEY_BITS_Unmarshal()
2587 INT32* size) { 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()
2598 INT32* size) { 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()
2621 INT32* size) { in TPMS_SYMCIPHER_PARMS_Marshal() argument
2623 total_size += TPMT_SYM_DEF_OBJECT_Marshal(&source->sym, buffer, size); in TPMS_SYMCIPHER_PARMS_Marshal()
2629 INT32* size) { in TPMS_SYMCIPHER_PARMS_Unmarshal() argument
2631 result = TPMT_SYM_DEF_OBJECT_Unmarshal(&target->sym, buffer, size); in TPMS_SYMCIPHER_PARMS_Unmarshal()
2640 INT32* size) { in TPMI_ALG_ASYM_SCHEME_Marshal() argument
2641 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_ASYM_SCHEME_Marshal()
2646 INT32* size, in TPMI_ALG_ASYM_SCHEME_Unmarshal() argument
2650 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_ASYM_SCHEME_Unmarshal()
2699 INT32* size) { 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()
2709 INT32* size) { 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()
2725 INT32* size) { 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()
2734 INT32* size) { 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()
2753 INT32* size, in TPMI_ALG_KDF_Unmarshal() argument
2757 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_KDF_Unmarshal()
2788 INT32* size) { in TPMS_SCHEME_KDF1_SP800_108_Marshal() argument
2789 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SCHEME_KDF1_SP800_108_Marshal()
2794 INT32* size) { in TPMS_SCHEME_KDF1_SP800_108_Unmarshal() argument
2795 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SCHEME_KDF1_SP800_108_Unmarshal()
2800 INT32* size) { in TPMS_SCHEME_KDF2_Marshal() argument
2801 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SCHEME_KDF2_Marshal()
2806 INT32* size) { in TPMS_SCHEME_KDF2_Unmarshal() argument
2807 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SCHEME_KDF2_Unmarshal()
2812 INT32* size) { in TPMS_SCHEME_KDF1_SP800_56A_Marshal() argument
2813 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SCHEME_KDF1_SP800_56A_Marshal()
2818 INT32* size) { in TPMS_SCHEME_KDF1_SP800_56A_Unmarshal() argument
2819 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SCHEME_KDF1_SP800_56A_Unmarshal()
2824 INT32* size) { in TPMS_SCHEME_MGF1_Marshal() argument
2825 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SCHEME_MGF1_Marshal()
2830 INT32* size) { in TPMS_SCHEME_MGF1_Unmarshal() argument
2831 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SCHEME_MGF1_Unmarshal()
2836 INT32* size, in TPMU_KDF_SCHEME_Marshal() argument
2842 size); in TPMU_KDF_SCHEME_Marshal()
2847 (TPMS_SCHEME_KDF1_SP800_56A*)&source->kdf1_sp800_56a, buffer, size); in TPMU_KDF_SCHEME_Marshal()
2852 size); in TPMU_KDF_SCHEME_Marshal()
2857 (TPMS_SCHEME_KDF1_SP800_108*)&source->kdf1_sp800_108, buffer, size); in TPMU_KDF_SCHEME_Marshal()
2869 INT32* size, 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()
2902 INT32* size) { 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()
2912 INT32* size) { 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()
2928 INT32* size) { in TPMI_ALG_ECC_SCHEME_Marshal() argument
2929 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_ECC_SCHEME_Marshal()
2934 INT32* size, in TPMI_ALG_ECC_SCHEME_Unmarshal() argument
2938 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_ECC_SCHEME_Unmarshal()
2975 INT32* size) { 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()
2985 INT32* size) { 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()
3001 INT32* size) { in TPMI_ECC_CURVE_Marshal() argument
3002 return uint16_t_Marshal(source, buffer, size); in TPMI_ECC_CURVE_Marshal()
3007 INT32* size) { in TPMI_ECC_CURVE_Unmarshal() argument
3013 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ECC_CURVE_Unmarshal()
3031 INT32* size) { 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()
3042 INT32* size) { 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()
3065 INT32* size) { in TPMI_ALG_KEYEDHASH_SCHEME_Marshal() argument
3066 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_KEYEDHASH_SCHEME_Marshal()
3071 INT32* size, in TPMI_ALG_KEYEDHASH_SCHEME_Unmarshal() argument
3075 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_KEYEDHASH_SCHEME_Unmarshal()
3100 INT32* size) { in TPMS_SCHEME_HMAC_Marshal() argument
3101 return TPMS_SCHEME_HASH_Marshal(source, buffer, size); in TPMS_SCHEME_HMAC_Marshal()
3106 INT32* size) { in TPMS_SCHEME_HMAC_Unmarshal() argument
3107 return TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); in TPMS_SCHEME_HMAC_Unmarshal()
3112 INT32* size) { 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()
3121 INT32* size) { 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()
3136 INT32* size, in TPMU_SCHEME_KEYEDHASH_Marshal() argument
3142 size); in TPMU_SCHEME_KEYEDHASH_Marshal()
3147 size); in TPMU_SCHEME_KEYEDHASH_Marshal()
3159 INT32* size, in TPMU_SCHEME_KEYEDHASH_Unmarshal() argument
3165 buffer, size); in TPMU_SCHEME_KEYEDHASH_Unmarshal()
3170 size); in TPMU_SCHEME_KEYEDHASH_Unmarshal()
3182 INT32* size) { 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()
3193 INT32* size) { 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()
3210 INT32* size) { in TPMS_KEYEDHASH_PARMS_Marshal() argument
3212 total_size += TPMT_KEYEDHASH_SCHEME_Marshal(&source->scheme, buffer, size); in TPMS_KEYEDHASH_PARMS_Marshal()
3218 INT32* size) { in TPMS_KEYEDHASH_PARMS_Unmarshal() argument
3220 result = TPMT_KEYEDHASH_SCHEME_Unmarshal(&target->scheme, buffer, size); in TPMS_KEYEDHASH_PARMS_Unmarshal()
3229 INT32* size, 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()
3245 size); in TPMU_PUBLIC_PARMS_Marshal()
3250 size); in TPMU_PUBLIC_PARMS_Marshal()
3258 INT32* size, 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()
3344 INT32* size) { in TPM2B_PUBLIC_Unmarshal() argument
3346 UINT32 start_size = *size; in TPM2B_PUBLIC_Unmarshal()
3348 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_PUBLIC_Unmarshal()
3352 if (target->t.size == 0) { in TPM2B_PUBLIC_Unmarshal()
3355 result = TPMT_PUBLIC_Unmarshal(&target->t.publicArea, buffer, size); in TPM2B_PUBLIC_Unmarshal()
3359 struct_size = start_size - *size - sizeof(target->t.size); in TPM2B_PUBLIC_Unmarshal()
3360 if (struct_size != target->t.size) { in TPM2B_PUBLIC_Unmarshal()
3368 INT32* size) { in TPM2B_SENSITIVE_DATA_Marshal() argument
3371 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_SENSITIVE_DATA_Marshal()
3372 for (i = 0; i < source->t.size; ++i) { in TPM2B_SENSITIVE_DATA_Marshal()
3373 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_SENSITIVE_DATA_Marshal()
3380 INT32* size) { in TPM2B_SENSITIVE_DATA_Unmarshal() argument
3383 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_SENSITIVE_DATA_Unmarshal()
3387 if (target->t.size == 0) { in TPM2B_SENSITIVE_DATA_Unmarshal()
3390 if (target->t.size > MAX_SYM_DATA) { in TPM2B_SENSITIVE_DATA_Unmarshal()
3393 for (i = 0; i < target->t.size; ++i) { in TPM2B_SENSITIVE_DATA_Unmarshal()
3394 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_SENSITIVE_DATA_Unmarshal()
3404 INT32* size) { in TPM2B_SYM_KEY_Marshal() argument
3407 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_SYM_KEY_Marshal()
3408 for (i = 0; i < source->t.size; ++i) { in TPM2B_SYM_KEY_Marshal()
3409 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_SYM_KEY_Marshal()
3416 INT32* size) { in TPM2B_SYM_KEY_Unmarshal() argument
3419 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_SYM_KEY_Unmarshal()
3423 if (target->t.size == 0) { in TPM2B_SYM_KEY_Unmarshal()
3426 if (target->t.size > MAX_SYM_KEY_BYTES) { in TPM2B_SYM_KEY_Unmarshal()
3429 for (i = 0; i < target->t.size; ++i) { in TPM2B_SYM_KEY_Unmarshal()
3430 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_SYM_KEY_Unmarshal()
3440 INT32* size, 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()
3468 INT32* size, 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()
3489 size); in TPMU_SENSITIVE_COMPOSITE_Unmarshal()
3497 INT32* size) { 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()
3503 size, source->sensitiveType); in TPMT_SENSITIVE_Marshal()
3509 INT32* size) { 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()
3533 INT32* size) { 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()
3542 INT32* size) { in TPM2B_SENSITIVE_Unmarshal() argument
3544 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_SENSITIVE_Unmarshal()
3548 if (target->t.size == 0) { in TPM2B_SENSITIVE_Unmarshal()
3551 result = TPMT_SENSITIVE_Unmarshal(&target->t.sensitiveArea, buffer, size); in TPM2B_SENSITIVE_Unmarshal()
3560 INT32* size) { 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()
3569 INT32* size) { 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()
3584 INT32* size) { 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()
3600 INT32* size) { in TPM2B_SENSITIVE_CREATE_Unmarshal() argument
3602 UINT32 start_size = *size; in TPM2B_SENSITIVE_CREATE_Unmarshal()
3604 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_SENSITIVE_CREATE_Unmarshal()
3608 if (target->t.size == 0) { in TPM2B_SENSITIVE_CREATE_Unmarshal()
3611 result = TPMS_SENSITIVE_CREATE_Unmarshal(&target->t.sensitive, buffer, size); in TPM2B_SENSITIVE_CREATE_Unmarshal()
3615 struct_size = start_size - *size - sizeof(target->t.size); in TPM2B_SENSITIVE_CREATE_Unmarshal()
3616 if (struct_size != target->t.size) { in TPM2B_SENSITIVE_CREATE_Unmarshal()
3624 INT32* size) { in TPM2B_TIMEOUT_Marshal() argument
3627 total_size += UINT16_Marshal(&source->t.size, buffer, size); in TPM2B_TIMEOUT_Marshal()
3628 for (i = 0; i < source->t.size; ++i) { in TPM2B_TIMEOUT_Marshal()
3629 total_size += BYTE_Marshal(&source->t.buffer[i], buffer, size); in TPM2B_TIMEOUT_Marshal()
3636 INT32* size) { in TPM2B_TIMEOUT_Unmarshal() argument
3639 result = UINT16_Unmarshal(&target->t.size, buffer, size); in TPM2B_TIMEOUT_Unmarshal()
3643 if (target->t.size == 0) { in TPM2B_TIMEOUT_Unmarshal()
3646 if (target->t.size > sizeof(UINT64)) { in TPM2B_TIMEOUT_Unmarshal()
3649 for (i = 0; i < target->t.size; ++i) { in TPM2B_TIMEOUT_Unmarshal()
3650 result = BYTE_Unmarshal(&target->t.buffer[i], buffer, size); in TPM2B_TIMEOUT_Unmarshal()
3660 INT32* size) { in TPMA_ALGORITHM_Marshal() argument
3661 return uint32_t_Marshal((uint32_t*)source, buffer, size); in TPMA_ALGORITHM_Marshal()
3666 INT32* size) { 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()
3715 INT32* size) { in TPMA_PERMANENT_Marshal() argument
3716 return uint32_t_Marshal((uint32_t*)source, buffer, size); in TPMA_PERMANENT_Marshal()
3721 INT32* size) { 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()
3742 INT32* size) { in TPMA_SESSION_Unmarshal() argument
3744 result = uint8_t_Unmarshal((uint8_t*)target, buffer, size); in TPMA_SESSION_Unmarshal()
3756 INT32* size) { in TPMA_STARTUP_CLEAR_Marshal() argument
3757 return uint32_t_Marshal((uint32_t*)source, buffer, size); in TPMA_STARTUP_CLEAR_Marshal()
3762 INT32* size) { in TPMA_STARTUP_CLEAR_Unmarshal() argument
3764 result = uint32_t_Unmarshal((uint32_t*)target, buffer, size); in TPMA_STARTUP_CLEAR_Unmarshal()
3776 INT32* size) { in TPMI_ALG_ASYM_Marshal() argument
3777 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_ASYM_Marshal()
3782 INT32* size, in TPMI_ALG_ASYM_Unmarshal() argument
3786 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_ASYM_Unmarshal()
3811 INT32* size) { in TPMI_ALG_RSA_DECRYPT_Marshal() argument
3812 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_RSA_DECRYPT_Marshal()
3817 INT32* size, in TPMI_ALG_RSA_DECRYPT_Unmarshal() argument
3821 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_RSA_DECRYPT_Unmarshal()
3846 INT32* size) { in TPMI_ALG_SIG_SCHEME_Marshal() argument
3847 return uint16_t_Marshal(source, buffer, size); in TPMI_ALG_SIG_SCHEME_Marshal()
3852 INT32* size, 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()
3900 INT32* size, in TPMI_ALG_SYM_Unmarshal() argument
3904 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ALG_SYM_Unmarshal()
3935 INT32* size) { in TPMI_DH_CONTEXT_Marshal() argument
3936 return uint32_t_Marshal(source, buffer, size); in TPMI_DH_CONTEXT_Marshal()
3941 INT32* size) { in TPMI_DH_CONTEXT_Unmarshal() argument
3944 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_DH_CONTEXT_Unmarshal()
3965 INT32* size) { in TPMI_DH_ENTITY_Marshal() argument
3966 return uint32_t_Marshal(source, buffer, size); in TPMI_DH_ENTITY_Marshal()
3971 INT32* size, in TPMI_DH_ENTITY_Unmarshal() argument
3975 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_DH_ENTITY_Unmarshal()
4013 INT32* size) { in TPMI_DH_OBJECT_Marshal() argument
4014 return uint32_t_Marshal(source, buffer, size); in TPMI_DH_OBJECT_Marshal()
4019 INT32* size, 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()
4048 INT32* size, in TPMI_DH_PCR_Unmarshal() argument
4052 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_DH_PCR_Unmarshal()
4070 INT32* size) { in TPMI_DH_PERSISTENT_Marshal() argument
4071 return uint32_t_Marshal(source, buffer, size); in TPMI_DH_PERSISTENT_Marshal()
4076 INT32* size) { in TPMI_DH_PERSISTENT_Unmarshal() argument
4079 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_DH_PERSISTENT_Unmarshal()
4094 INT32* size) { in TPMI_ECC_KEY_EXCHANGE_Marshal() argument
4095 return uint16_t_Marshal(source, buffer, size); in TPMI_ECC_KEY_EXCHANGE_Marshal()
4100 INT32* size, in TPMI_ECC_KEY_EXCHANGE_Unmarshal() argument
4104 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ECC_KEY_EXCHANGE_Unmarshal()
4132 INT32* size) { in TPMI_RH_CLEAR_Marshal() argument
4133 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_CLEAR_Marshal()
4138 INT32* size) { in TPMI_RH_CLEAR_Unmarshal() argument
4141 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_CLEAR_Unmarshal()
4159 INT32* size) { in TPMI_RH_ENABLES_Marshal() argument
4160 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_ENABLES_Marshal()
4165 INT32* size, in TPMI_RH_ENABLES_Unmarshal() argument
4169 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_ENABLES_Unmarshal()
4192 INT32* size) { in TPMI_RH_ENDORSEMENT_Marshal() argument
4193 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_ENDORSEMENT_Marshal()
4198 INT32* size, in TPMI_RH_ENDORSEMENT_Unmarshal() argument
4202 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_ENDORSEMENT_Unmarshal()
4222 INT32* size) { in TPMI_RH_HIERARCHY_Marshal() argument
4223 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_HIERARCHY_Marshal()
4228 INT32* size, in TPMI_RH_HIERARCHY_Unmarshal() argument
4232 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_HIERARCHY_Unmarshal()
4254 INT32* size) { in TPMI_RH_HIERARCHY_AUTH_Marshal() argument
4255 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_HIERARCHY_AUTH_Marshal()
4260 INT32* size) { in TPMI_RH_HIERARCHY_AUTH_Unmarshal() argument
4263 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_HIERARCHY_AUTH_Unmarshal()
4283 INT32* size) { in TPMI_RH_LOCKOUT_Marshal() argument
4284 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_LOCKOUT_Marshal()
4289 INT32* size) { in TPMI_RH_LOCKOUT_Unmarshal() argument
4292 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_LOCKOUT_Unmarshal()
4309 INT32* size) { in TPMI_RH_NV_AUTH_Marshal() argument
4310 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_NV_AUTH_Marshal()
4315 INT32* size) { in TPMI_RH_NV_AUTH_Unmarshal() argument
4318 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_NV_AUTH_Unmarshal()
4339 INT32* size) { in TPMI_RH_OWNER_Marshal() argument
4340 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_OWNER_Marshal()
4345 INT32* size, in TPMI_RH_OWNER_Unmarshal() argument
4349 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_OWNER_Unmarshal()
4369 INT32* size) { in TPMI_RH_PLATFORM_Marshal() argument
4370 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_PLATFORM_Marshal()
4375 INT32* size) { in TPMI_RH_PLATFORM_Unmarshal() argument
4378 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_PLATFORM_Unmarshal()
4395 INT32* size) { in TPMI_RH_PROVISION_Marshal() argument
4396 return uint32_t_Marshal(source, buffer, size); in TPMI_RH_PROVISION_Marshal()
4401 INT32* size) { in TPMI_RH_PROVISION_Unmarshal() argument
4404 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_RH_PROVISION_Unmarshal()
4422 INT32* size) { in TPMI_SH_AUTH_SESSION_Marshal() argument
4423 return uint32_t_Marshal(source, buffer, size); in TPMI_SH_AUTH_SESSION_Marshal()
4428 INT32* size, 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()
4457 INT32* size) { in TPMI_SH_HMAC_Unmarshal() argument
4460 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_SH_HMAC_Unmarshal()
4475 INT32* size) { in TPMI_SH_POLICY_Marshal() argument
4476 return uint32_t_Marshal(source, buffer, size); in TPMI_SH_POLICY_Marshal()
4481 INT32* size) { in TPMI_SH_POLICY_Unmarshal() argument
4484 result = uint32_t_Unmarshal(target, buffer, size); in TPMI_SH_POLICY_Unmarshal()
4499 INT32* size) { in TPMI_ST_ATTEST_Marshal() argument
4500 return uint16_t_Marshal(source, buffer, size); in TPMI_ST_ATTEST_Marshal()
4505 INT32* size) { in TPMI_ST_ATTEST_Unmarshal() argument
4508 result = uint16_t_Unmarshal(target, buffer, size); in TPMI_ST_ATTEST_Unmarshal()
4531 INT32* size) { in TPMI_ST_COMMAND_TAG_Marshal() argument
4532 return uint16_t_Marshal(source, buffer, size); in TPMI_ST_COMMAND_TAG_Marshal()
4537 INT32* size) { 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()
4610 INT32* size) { 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()
4619 INT32* size) { 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()
4634 INT32* size) { 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()
4647 INT32* size) { 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()
5332 INT32* size, 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()
5389 INT32* size, 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()
5484 INT32* size) { 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()
5496 INT32* size) { 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()
5517 INT32* size) { in TPM_ECC_CURVE_Marshal() argument
5518 return uint16_t_Marshal(source, buffer, size); in TPM_ECC_CURVE_Marshal()
5523 INT32* size) { in TPM_ECC_CURVE_Unmarshal() argument
5525 result = uint16_t_Unmarshal(target, buffer, size); in TPM_ECC_CURVE_Unmarshal()
5561 INT32* size) { 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()
5573 INT32* size) { 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()
5851 INT32* size) { 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()
5864 INT32* size) { 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()
5892 INT32* size) { 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()
5905 INT32* size) { 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()
5927 INT32* size) { 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()
5936 INT32* size) { 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()
5951 INT32* size) { 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()
5964 INT32* size) { 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()
5986 INT32* size) { 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()
5995 INT32* size) { 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()
6010 INT32* size) { 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()
6028 INT32* size) { 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()
6087 INT32* size) { in TPM_GENERATED_Marshal() argument
6088 return uint32_t_Marshal(source, buffer, size); in TPM_GENERATED_Marshal()
6093 INT32* size) { in TPM_GENERATED_Unmarshal() argument
6095 result = uint32_t_Unmarshal(target, buffer, size); in TPM_GENERATED_Unmarshal()
6107 INT32* size) { 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()
6116 INT32* size) { 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()
6131 INT32* size) { 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()
6142 INT32* size) { 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()
6165 INT32* size) { 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()
6174 INT32* size) { 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()
6189 INT32* size) { 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()
6198 INT32* size) { 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()
6213 INT32* size) { 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()
6222 INT32* size) { 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()
6237 INT32* size) { 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()
6248 INT32* size) { 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()
6271 INT32* size) { 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()
6280 INT32* size) { 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()
6295 INT32* size) { 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()
6304 INT32* size) { 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()
6319 INT32* size) { 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()
6329 INT32* size) { 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()
6348 INT32* size, in TPMU_ATTEST_Marshal() argument
6353 buffer, size); in TPMU_ATTEST_Marshal()
6356 buffer, size); in TPMU_ATTEST_Marshal()
6359 size); 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()
6378 INT32* size, in TPMU_ATTEST_Unmarshal() argument
6383 buffer, size); in TPMU_ATTEST_Unmarshal()
6386 (TPMS_CREATION_INFO*)&target->creation, buffer, size); in TPMU_ATTEST_Unmarshal()
6389 size); 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()
6454 INT32* size) { 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()
6466 INT32* size) { 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()
6490 INT32* size) { 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()
6500 INT32* size) { 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()
6568 INT32* size, 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()
6593 size); in TPMU_CAPABILITIES_Marshal()
6600 INT32* size, in TPMU_CAPABILITIES_Unmarshal() argument
6605 (TPML_ALG_PROPERTY*)&target->algorithms, buffer, size); in TPMU_CAPABILITIES_Unmarshal()
6608 size); 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()
6633 INT32* size) { 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()
6643 INT32* size) { 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()
6668 INT32* size) { 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()
6691 INT32* size) { 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()
6701 INT32* size) { 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()
6716 INT32* size) { 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()
6728 INT32* size) { 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()
6752 INT32* size) { 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()
6762 INT32* size) { 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()
6781 INT32* size) { in TPMS_SIGNATURE_ECDAA_Marshal() argument
6782 return TPMS_SIGNATURE_ECC_Marshal(source, buffer, size); in TPMS_SIGNATURE_ECDAA_Marshal()
6787 INT32* size) { in TPMS_SIGNATURE_ECDAA_Unmarshal() argument
6788 return TPMS_SIGNATURE_ECC_Unmarshal(target, buffer, size); in TPMS_SIGNATURE_ECDAA_Unmarshal()
6793 INT32* size) { in TPMS_SIGNATURE_ECDSA_Marshal() argument
6794 return TPMS_SIGNATURE_ECC_Marshal(source, buffer, size); in TPMS_SIGNATURE_ECDSA_Marshal()
6799 INT32* size) { in TPMS_SIGNATURE_ECDSA_Unmarshal() argument
6800 return TPMS_SIGNATURE_ECC_Unmarshal(target, buffer, size); in TPMS_SIGNATURE_ECDSA_Unmarshal()
6805 INT32* size) { in TPMS_SIGNATURE_ECSCHNORR_Marshal() argument
6806 return TPMS_SIGNATURE_ECC_Marshal(source, buffer, size); in TPMS_SIGNATURE_ECSCHNORR_Marshal()
6811 INT32* size) { in TPMS_SIGNATURE_ECSCHNORR_Unmarshal() argument
6812 return TPMS_SIGNATURE_ECC_Unmarshal(target, buffer, size); in TPMS_SIGNATURE_ECSCHNORR_Unmarshal()
6817 INT32* size) { 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()
6826 INT32* size) { 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()
6841 INT32* size) { in TPMS_SIGNATURE_RSAPSS_Marshal() argument
6842 return TPMS_SIGNATURE_RSA_Marshal(source, buffer, size); in TPMS_SIGNATURE_RSAPSS_Marshal()
6847 INT32* size) { in TPMS_SIGNATURE_RSAPSS_Unmarshal() argument
6848 return TPMS_SIGNATURE_RSA_Unmarshal(target, buffer, size); in TPMS_SIGNATURE_RSAPSS_Unmarshal()
6853 INT32* size) { in TPMS_SIGNATURE_RSASSA_Marshal() argument
6854 return TPMS_SIGNATURE_RSA_Marshal(source, buffer, size); in TPMS_SIGNATURE_RSASSA_Marshal()
6859 INT32* size) { in TPMS_SIGNATURE_RSASSA_Unmarshal() argument
6860 return TPMS_SIGNATURE_RSA_Unmarshal(target, buffer, size); in TPMS_SIGNATURE_RSASSA_Unmarshal()
6865 INT32* size) { in TPMS_SIGNATURE_SM2_Marshal() argument
6866 return TPMS_SIGNATURE_ECC_Marshal(source, buffer, size); in TPMS_SIGNATURE_SM2_Marshal()
6871 INT32* size) { in TPMS_SIGNATURE_SM2_Unmarshal() argument
6872 return TPMS_SIGNATURE_ECC_Unmarshal(target, buffer, size); in TPMS_SIGNATURE_SM2_Unmarshal()
6877 INT32* size) { 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()
6887 INT32* size) { 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()
6903 INT32* size) { 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()
6913 INT32* size) { 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()
6929 INT32* size, 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()
6976 INT32* size, 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()
7023 INT32* size) { 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()
7033 INT32* size) { 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()
7049 INT32* size, 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()
7085 size); in TPMU_SIG_SCHEME_Marshal()
7097 INT32* size, 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()
7145 INT32* size) { 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()
7155 INT32* size) { 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()
7181 INT32* size) { 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()
7274 INT32* size) { 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()
7293 INT32* size) { 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()
7303 INT32* size) { 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()
7322 INT32* size) { 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()
7332 INT32* size) { 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()
7351 INT32* size) { 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()
7361 INT32* size) { 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()
7380 INT32* size, in TPMU_SYM_DETAILS_Marshal() argument
7409 INT32* size, in TPMU_SYM_DETAILS_Unmarshal() argument
7438 INT32* size) { in TPM_ALGORITHM_ID_Marshal() argument
7439 return uint32_t_Marshal(source, buffer, size); in TPM_ALGORITHM_ID_Marshal()
7444 INT32* size) { in TPM_ALGORITHM_ID_Unmarshal() argument
7445 return uint32_t_Unmarshal(target, buffer, size); in TPM_ALGORITHM_ID_Unmarshal()
7450 INT32* size) { in TPM_AUTHORIZATION_SIZE_Marshal() argument
7451 return uint32_t_Marshal(source, buffer, size); in TPM_AUTHORIZATION_SIZE_Marshal()
7456 INT32* size) { in TPM_AUTHORIZATION_SIZE_Unmarshal() argument
7457 return uint32_t_Unmarshal(target, buffer, size); in TPM_AUTHORIZATION_SIZE_Unmarshal()
7462 INT32* size) { in TPM_CLOCK_ADJUST_Marshal() argument
7463 return int8_t_Marshal(source, buffer, size); in TPM_CLOCK_ADJUST_Marshal()
7468 INT32* size) { 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()
7693 INT32* size) { in TPM_KEY_SIZE_Unmarshal() argument
7694 return uint16_t_Unmarshal(target, buffer, size); in TPM_KEY_SIZE_Unmarshal()
7699 INT32* size) { in TPM_MODIFIER_INDICATOR_Marshal() argument
7700 return uint32_t_Marshal(source, buffer, size); in TPM_MODIFIER_INDICATOR_Marshal()
7705 INT32* size) { 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()
7715 INT32* size) { in TPM_NV_INDEX_Unmarshal() argument
7717 result = uint32_t_Unmarshal((uint32_t*)target, buffer, size); in TPM_NV_INDEX_Unmarshal()
7726 INT32* size) { in TPM_PARAMETER_SIZE_Marshal() argument
7727 return uint32_t_Marshal(source, buffer, size); in TPM_PARAMETER_SIZE_Marshal()
7732 INT32* size) { 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()