• Home
  • Raw
  • Download

Lines Matching refs:end

39                             const uint8_t* end) {  in serialize_key_blob()  argument
40 return append_size_and_data_to_buf(buf, end, key_blob.key_material, key_blob.key_material_size); in serialize_key_blob()
44 const uint8_t* end) { in deserialize_key_blob() argument
48 if (!copy_size_and_data_from_buf(buf_ptr, end, &key_blob->key_material_size, in deserialize_key_blob()
67 uint8_t* serialize_blob(const keymaster_blob_t& blob, uint8_t* buf, const uint8_t* end) { in serialize_blob() argument
68 return append_size_and_data_to_buf(buf, end, blob.data, blob.data_length); in serialize_blob()
71 bool deserialize_blob(keymaster_blob_t* blob, const uint8_t** buf_ptr, const uint8_t* end) { in deserialize_blob() argument
75 if (!copy_size_and_data_from_buf(buf_ptr, end, &blob->data_length, &deserialized_blob)) in deserialize_blob()
96 const uint8_t* end) { in serialize_chain() argument
97 buf = append_uint32_to_buf(buf, end, certificate_chain.entry_count); in serialize_chain()
99 buf = append_size_and_data_to_buf(buf, end, certificate_chain.entries[i].data, in serialize_chain()
105 CertificateChain deserialize_chain(const uint8_t** buf_ptr, const uint8_t* end) { in deserialize_chain() argument
107 if (!copy_uint32_from_buf(buf_ptr, end, &entry_count) || entry_count > kMaxChainEntryCount) { in deserialize_chain()
117 if (!copy_size_and_data_from_buf(buf_ptr, end, &data_length, &data)) return {}; in deserialize_chain()
169 uint8_t* KeymasterResponse::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
170 buf = append_uint32_to_buf(buf, end, static_cast<uint32_t>(error)); in Serialize()
171 if (error == KM_ERROR_OK) buf = NonErrorSerialize(buf, end); in Serialize()
175 bool KeymasterResponse::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
176 if (!copy_uint32_from_buf(buf_ptr, end, &error)) return false; in Deserialize()
178 return NonErrorDeserialize(buf_ptr, end); in Deserialize()
190 uint8_t* GenerateKeyRequest::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
191 buf = key_description.Serialize(buf, end); in Serialize()
193 buf = serialize_key_blob(attestation_signing_key_blob, buf, end); in Serialize()
194 buf = attest_key_params.Serialize(buf, end); in Serialize()
195 return serialize_blob(issuer_subject, buf, end); in Serialize()
198 bool GenerateKeyRequest::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
199 if (!key_description.Deserialize(buf_ptr, end)) return false; in Deserialize()
201 return deserialize_key_blob(&attestation_signing_key_blob, buf_ptr, end) // in Deserialize()
202 && attest_key_params.Deserialize(buf_ptr, end) // in Deserialize()
203 && deserialize_blob(&issuer_subject, buf_ptr, end); in Deserialize()
213 uint8_t* GenerateKeyResponse::NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { in NonErrorSerialize()
214 buf = serialize_key_blob(key_blob, buf, end); in NonErrorSerialize()
215 buf = enforced.Serialize(buf, end); in NonErrorSerialize()
216 buf = unenforced.Serialize(buf, end); in NonErrorSerialize()
218 return serialize_chain(certificate_chain, buf, end); in NonErrorSerialize()
221 bool GenerateKeyResponse::NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) { in NonErrorDeserialize() argument
222 if (!deserialize_key_blob(&key_blob, buf_ptr, end) || // in NonErrorDeserialize()
223 !enforced.Deserialize(buf_ptr, end) || // in NonErrorDeserialize()
224 !unenforced.Deserialize(buf_ptr, end)) { in NonErrorDeserialize()
228 certificate_chain = deserialize_chain(buf_ptr, end); in NonErrorDeserialize()
236 uint8_t* GenerateRkpKeyResponse::NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { in NonErrorSerialize()
237 buf = serialize_key_blob(key_blob, buf, end); in NonErrorSerialize()
238 return serialize_blob(maced_public_key, buf, end); in NonErrorSerialize()
241 bool GenerateRkpKeyResponse::NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) { in NonErrorDeserialize() argument
242 return deserialize_key_blob(&key_blob, buf_ptr, end) && in NonErrorDeserialize()
243 deserialize_blob(&maced_public_key, buf_ptr, end); in NonErrorDeserialize()
257 uint8_t* GenerateCsrRequest::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
258 buf = append_to_buf(buf, end, &test_mode, sizeof(uint8_t)); in Serialize()
259 buf = append_uint32_to_buf(buf, end, num_keys); in Serialize()
261 buf = serialize_blob(keys_to_sign_array[i], buf, end); in Serialize()
263 buf = serialize_blob(endpoint_enc_cert_chain, buf, end); in Serialize()
264 return serialize_blob(challenge, buf, end); in Serialize()
267 bool GenerateCsrRequest::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
268 if (!copy_from_buf(buf_ptr, end, &test_mode, sizeof(uint8_t)) || in Deserialize()
269 !copy_from_buf(buf_ptr, end, &num_keys, sizeof(uint32_t))) { in Deserialize()
275 if (!deserialize_blob(&keys_to_sign_array[i], buf_ptr, end)) return false; in Deserialize()
277 return deserialize_blob(&endpoint_enc_cert_chain, buf_ptr, end) && in Deserialize()
278 deserialize_blob(&challenge, buf_ptr, end); in Deserialize()
301 uint8_t* GenerateCsrResponse::NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { in NonErrorSerialize()
302 buf = serialize_blob(keys_to_sign_mac, buf, end); in NonErrorSerialize()
303 buf = serialize_blob(device_info_blob, buf, end); in NonErrorSerialize()
304 return serialize_blob(protected_data_blob, buf, end); in NonErrorSerialize()
307 bool GenerateCsrResponse::NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) { in NonErrorDeserialize() argument
308 return deserialize_blob(&keys_to_sign_mac, buf_ptr, end) && in NonErrorDeserialize()
309 deserialize_blob(&device_info_blob, buf_ptr, end) && in NonErrorDeserialize()
310 deserialize_blob(&protected_data_blob, buf_ptr, end); in NonErrorDeserialize()
325 uint8_t* GetKeyCharacteristicsRequest::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
326 buf = serialize_key_blob(key_blob, buf, end); in Serialize()
327 return additional_params.Serialize(buf, end); in Serialize()
330 bool GetKeyCharacteristicsRequest::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
331 return deserialize_key_blob(&key_blob, buf_ptr, end) && in Deserialize()
332 additional_params.Deserialize(buf_ptr, end); in Deserialize()
339 uint8_t* GetKeyCharacteristicsResponse::NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { in NonErrorSerialize()
340 buf = enforced.Serialize(buf, end); in NonErrorSerialize()
341 return unenforced.Serialize(buf, end); in NonErrorSerialize()
345 const uint8_t* end) { in NonErrorDeserialize() argument
346 return enforced.Deserialize(buf_ptr, end) && unenforced.Deserialize(buf_ptr, end); in NonErrorDeserialize()
358 uint8_t* BeginOperationRequest::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
359 buf = append_uint32_to_buf(buf, end, purpose); in Serialize()
360 buf = serialize_key_blob(key_blob, buf, end); in Serialize()
361 return additional_params.Serialize(buf, end); in Serialize()
364 bool BeginOperationRequest::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
365 return copy_uint32_from_buf(buf_ptr, end, &purpose) && in Deserialize()
366 deserialize_key_blob(&key_blob, buf_ptr, end) && in Deserialize()
367 additional_params.Deserialize(buf_ptr, end); in Deserialize()
377 uint8_t* BeginOperationResponse::NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { in NonErrorSerialize()
378 buf = append_uint64_to_buf(buf, end, op_handle); in NonErrorSerialize()
379 if (message_version > 0) buf = output_params.Serialize(buf, end); in NonErrorSerialize()
383 bool BeginOperationResponse::NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) { in NonErrorDeserialize() argument
384 bool retval = copy_uint64_from_buf(buf_ptr, end, &op_handle); in NonErrorDeserialize()
385 if (retval && message_version > 0) retval = output_params.Deserialize(buf_ptr, end); in NonErrorDeserialize()
396 uint8_t* UpdateOperationRequest::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
397 buf = append_uint64_to_buf(buf, end, op_handle); in Serialize()
398 buf = input.Serialize(buf, end); in Serialize()
399 if (message_version > 0) buf = additional_params.Serialize(buf, end); in Serialize()
403 bool UpdateOperationRequest::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
404 bool retval = copy_uint64_from_buf(buf_ptr, end, &op_handle) && input.Deserialize(buf_ptr, end); in Deserialize()
405 if (retval && message_version > 0) retval = additional_params.Deserialize(buf_ptr, end); in Deserialize()
431 uint8_t* UpdateOperationResponse::NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { in NonErrorSerialize()
432 buf = output.Serialize(buf, end); in NonErrorSerialize()
433 if (message_version > 0) buf = append_uint32_to_buf(buf, end, input_consumed); in NonErrorSerialize()
434 if (message_version > 1) buf = output_params.Serialize(buf, end); in NonErrorSerialize()
438 bool UpdateOperationResponse::NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) { in NonErrorDeserialize() argument
439 bool retval = output.Deserialize(buf_ptr, end); in NonErrorDeserialize()
440 if (retval && message_version > 0) retval = copy_uint32_from_buf(buf_ptr, end, &input_consumed); in NonErrorDeserialize()
441 if (retval && message_version > 1) retval = output_params.Deserialize(buf_ptr, end); in NonErrorDeserialize()
467 uint8_t* FinishOperationRequest::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
468 buf = append_uint64_to_buf(buf, end, op_handle); in Serialize()
469 buf = signature.Serialize(buf, end); in Serialize()
470 if (message_version > 0) buf = additional_params.Serialize(buf, end); in Serialize()
471 if (message_version > 2) buf = input.Serialize(buf, end); in Serialize()
475 bool FinishOperationRequest::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
477 copy_uint64_from_buf(buf_ptr, end, &op_handle) && signature.Deserialize(buf_ptr, end); in Deserialize()
478 if (retval && message_version > 0) retval = additional_params.Deserialize(buf_ptr, end); in Deserialize()
479 if (retval && message_version > 2) retval = input.Deserialize(buf_ptr, end); in Deserialize()
490 uint8_t* FinishOperationResponse::NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { in NonErrorSerialize()
491 buf = output.Serialize(buf, end); in NonErrorSerialize()
492 if (message_version > 1) buf = output_params.Serialize(buf, end); in NonErrorSerialize()
496 bool FinishOperationResponse::NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) { in NonErrorDeserialize() argument
497 bool retval = output.Deserialize(buf_ptr, end); in NonErrorDeserialize()
498 if (retval && message_version > 1) retval = output_params.Deserialize(buf_ptr, end); in NonErrorDeserialize()
506 uint8_t* AddEntropyRequest::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
507 return random_data.Serialize(buf, end); in Serialize()
510 bool AddEntropyRequest::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
511 return random_data.Deserialize(buf_ptr, end); in Deserialize()
525 uint8_t* ImportKeyRequest::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
526 buf = key_description.Serialize(buf, end); in Serialize()
527 buf = append_uint32_to_buf(buf, end, key_format); in Serialize()
528 buf = serialize_key_blob(key_data, buf, end); in Serialize()
530 buf = serialize_key_blob(attestation_signing_key_blob, buf, end); in Serialize()
531 buf = attest_key_params.Serialize(buf, end); in Serialize()
532 return serialize_blob(issuer_subject, buf, end); in Serialize()
535 bool ImportKeyRequest::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
536 if (!(key_description.Deserialize(buf_ptr, end) && in Deserialize()
537 copy_uint32_from_buf(buf_ptr, end, &key_format) && in Deserialize()
538 deserialize_key_blob(&key_data, buf_ptr, end))) { in Deserialize()
543 return deserialize_key_blob(&attestation_signing_key_blob, buf_ptr, end) // in Deserialize()
544 && attest_key_params.Deserialize(buf_ptr, end) // in Deserialize()
545 && deserialize_blob(&issuer_subject, buf_ptr, end); in Deserialize()
559 uint8_t* ImportKeyResponse::NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { in NonErrorSerialize()
560 buf = serialize_key_blob(key_blob, buf, end); in NonErrorSerialize()
561 buf = enforced.Serialize(buf, end); in NonErrorSerialize()
562 buf = unenforced.Serialize(buf, end); in NonErrorSerialize()
564 return serialize_chain(certificate_chain, buf, end); in NonErrorSerialize()
567 bool ImportKeyResponse::NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) { in NonErrorDeserialize() argument
568 if (!deserialize_key_blob(&key_blob, buf_ptr, end) || // in NonErrorDeserialize()
569 !enforced.Deserialize(buf_ptr, end) || // in NonErrorDeserialize()
570 !unenforced.Deserialize(buf_ptr, end)) { in NonErrorDeserialize()
574 certificate_chain = deserialize_chain(buf_ptr, end); in NonErrorDeserialize()
587 uint8_t* ExportKeyRequest::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
588 buf = additional_params.Serialize(buf, end); in Serialize()
589 buf = append_uint32_to_buf(buf, end, key_format); in Serialize()
590 return serialize_key_blob(key_blob, buf, end); in Serialize()
593 bool ExportKeyRequest::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
594 return additional_params.Deserialize(buf_ptr, end) && in Deserialize()
595 copy_uint32_from_buf(buf_ptr, end, &key_format) && in Deserialize()
596 deserialize_key_blob(&key_blob, buf_ptr, end); in Deserialize()
609 uint8_t* ExportKeyResponse::NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { in NonErrorSerialize()
610 return append_size_and_data_to_buf(buf, end, key_data, key_data_length); in NonErrorSerialize()
613 bool ExportKeyResponse::NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) { in NonErrorDeserialize() argument
617 if (!copy_size_and_data_from_buf(buf_ptr, end, &key_data_length, &deserialized_key_material)) in NonErrorDeserialize()
631 uint8_t* DeleteKeyRequest::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
632 return serialize_key_blob(key_blob, buf, end); in Serialize()
635 bool DeleteKeyRequest::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
636 return deserialize_key_blob(&key_blob, buf_ptr, end); in Deserialize()
643 uint8_t* GetVersionResponse::NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { in NonErrorSerialize()
644 if (buf + NonErrorSerializedSize() <= end) { in NonErrorSerialize()
654 bool GetVersionResponse::NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) { in NonErrorDeserialize() argument
655 if (*buf_ptr + NonErrorSerializedSize() > end) return false; in NonErrorDeserialize()
676 uint8_t* AttestKeyRequest::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
677 buf = serialize_key_blob(key_blob, buf, end); in Serialize()
678 return attest_params.Serialize(buf, end); in Serialize()
681 bool AttestKeyRequest::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
682 return deserialize_key_blob(&key_blob, buf_ptr, end) && attest_params.Deserialize(buf_ptr, end); in Deserialize()
689 uint8_t* AttestKeyResponse::NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { in NonErrorSerialize()
690 return serialize_chain(certificate_chain, buf, end); in NonErrorSerialize()
693 bool AttestKeyResponse::NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) { in NonErrorDeserialize() argument
694 certificate_chain = deserialize_chain(buf_ptr, end); in NonErrorDeserialize()
710 uint8_t* UpgradeKeyRequest::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
711 buf = serialize_key_blob(key_blob, buf, end); in Serialize()
712 return upgrade_params.Serialize(buf, end); in Serialize()
715 bool UpgradeKeyRequest::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
716 return deserialize_key_blob(&key_blob, buf_ptr, end) && in Deserialize()
717 upgrade_params.Deserialize(buf_ptr, end); in Deserialize()
728 uint8_t* UpgradeKeyResponse::NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { in NonErrorSerialize()
729 return serialize_key_blob(upgraded_key, buf, end); in NonErrorSerialize()
732 bool UpgradeKeyResponse::NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) { in NonErrorDeserialize() argument
733 return deserialize_key_blob(&upgraded_key, buf_ptr, end); in NonErrorDeserialize()
740 uint8_t* HmacSharingParameters::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
741 buf = serialize_blob(seed, buf, end); in Serialize()
742 return append_to_buf(buf, end, nonce, sizeof(nonce)); in Serialize()
745 bool HmacSharingParameters::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
746 return deserialize_blob(&seed, buf_ptr, end) && in Deserialize()
747 copy_from_buf(buf_ptr, end, nonce, sizeof(nonce)); in Deserialize()
758 uint8_t* HmacSharingParametersArray::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
759 buf = append_uint32_to_buf(buf, end, num_params); in Serialize()
761 buf = params_array[i].Serialize(buf, end); in Serialize()
766 bool HmacSharingParametersArray::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
767 if (!copy_uint32_from_buf(buf_ptr, end, &num_params)) return false; in Deserialize()
771 if (!params_array[i].Deserialize(buf_ptr, end)) return false; in Deserialize()
780 uint8_t* ComputeSharedHmacResponse::NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { in NonErrorSerialize()
781 return serialize_blob(sharing_check, buf, end); in NonErrorSerialize()
784 bool ComputeSharedHmacResponse::NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) { in NonErrorDeserialize() argument
785 return deserialize_blob(&sharing_check, buf_ptr, end); in NonErrorDeserialize()
794 uint8_t* ImportWrappedKeyRequest::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
795 buf = serialize_key_blob(wrapped_key, buf, end); in Serialize()
796 buf = serialize_key_blob(wrapping_key, buf, end); in Serialize()
797 buf = serialize_key_blob(masking_key, buf, end); in Serialize()
798 buf = additional_params.Serialize(buf, end); in Serialize()
799 buf = append_uint64_to_buf(buf, end, password_sid); in Serialize()
800 return append_uint64_to_buf(buf, end, biometric_sid); in Serialize()
803 bool ImportWrappedKeyRequest::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
804 return deserialize_key_blob(&wrapped_key, buf_ptr, end) && in Deserialize()
805 deserialize_key_blob(&wrapping_key, buf_ptr, end) && in Deserialize()
806 deserialize_key_blob(&masking_key, buf_ptr, end) && in Deserialize()
807 additional_params.Deserialize(buf_ptr, end) && in Deserialize()
808 copy_uint64_from_buf(buf_ptr, end, &password_sid) && in Deserialize()
809 copy_uint64_from_buf(buf_ptr, end, &biometric_sid); in Deserialize()
835 uint8_t* ImportWrappedKeyResponse::NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { in NonErrorSerialize()
836 buf = serialize_key_blob(key_blob, buf, end); in NonErrorSerialize()
837 buf = enforced.Serialize(buf, end); in NonErrorSerialize()
838 buf = unenforced.Serialize(buf, end); in NonErrorSerialize()
840 return serialize_chain(certificate_chain, buf, end); in NonErrorSerialize()
843 bool ImportWrappedKeyResponse::NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) { in NonErrorDeserialize() argument
844 if (!deserialize_key_blob(&key_blob, buf_ptr, end) || // in NonErrorDeserialize()
845 !enforced.Deserialize(buf_ptr, end) || // in NonErrorDeserialize()
846 !unenforced.Deserialize(buf_ptr, end)) { in NonErrorDeserialize()
850 certificate_chain = deserialize_chain(buf_ptr, end); in NonErrorDeserialize()
859 uint8_t* HardwareAuthToken::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
860 buf = append_uint64_to_buf(buf, end, challenge); in Serialize()
861 buf = append_uint64_to_buf(buf, end, user_id); in Serialize()
862 buf = append_uint64_to_buf(buf, end, authenticator_id); in Serialize()
863 buf = append_uint32_to_buf(buf, end, authenticator_type); in Serialize()
864 buf = append_uint64_to_buf(buf, end, timestamp); in Serialize()
865 return serialize_blob(mac, buf, end); in Serialize()
868 bool HardwareAuthToken::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
869 return copy_uint64_from_buf(buf_ptr, end, &challenge) && in Deserialize()
870 copy_uint64_from_buf(buf_ptr, end, &user_id) && in Deserialize()
871 copy_uint64_from_buf(buf_ptr, end, &authenticator_id) && in Deserialize()
872 copy_uint32_from_buf(buf_ptr, end, &authenticator_type) && in Deserialize()
873 copy_uint64_from_buf(buf_ptr, end, &timestamp) && // in Deserialize()
874 deserialize_blob(&mac, buf_ptr, end); in Deserialize()
882 uint8_t* VerificationToken::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
883 buf = append_uint64_to_buf(buf, end, challenge); in Serialize()
884 buf = append_uint64_to_buf(buf, end, timestamp); in Serialize()
885 buf = parameters_verified.Serialize(buf, end); in Serialize()
886 buf = append_uint32_to_buf(buf, end, security_level); in Serialize()
887 return serialize_blob(mac, buf, end); in Serialize()
890 bool VerificationToken::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
891 return copy_uint64_from_buf(buf_ptr, end, &challenge) && in Deserialize()
892 copy_uint64_from_buf(buf_ptr, end, &timestamp) && in Deserialize()
893 parameters_verified.Deserialize(buf_ptr, end) && in Deserialize()
894 copy_uint32_from_buf(buf_ptr, end, &security_level) && in Deserialize()
895 deserialize_blob(&mac, buf_ptr, end); in Deserialize()
904 uint8_t* GetVersion2Response::NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { in NonErrorSerialize()
905 buf = append_uint32_to_buf(buf, end, max_message_version); in NonErrorSerialize()
906 buf = append_uint32_to_buf(buf, end, km_version); in NonErrorSerialize()
907 return append_uint32_to_buf(buf, end, km_date); in NonErrorSerialize()
910 bool GetVersion2Response::NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) { in NonErrorDeserialize() argument
911 return copy_uint32_from_buf(buf_ptr, end, &max_message_version) && in NonErrorDeserialize()
912 copy_uint32_from_buf(buf_ptr, end, &km_version) && in NonErrorDeserialize()
913 copy_uint32_from_buf(buf_ptr, end, &km_date); in NonErrorDeserialize()