Lines Matching refs:serializedToken
155 std::vector<uint8_t> serializedToken; in serializeVerificationToken() local
156 appendUint64(serializedToken, token.challenge); in serializeVerificationToken()
157 appendUint64(serializedToken, token.timestamp); in serializeVerificationToken()
158 appendUint32(serializedToken, uint32_t(token.securityLevel)); in serializeVerificationToken()
159 appendUint32(serializedToken, token.mac.size()); in serializeVerificationToken()
160 serializedToken.insert(serializedToken.end(), token.mac.begin(), token.mac.end()); in serializeVerificationToken()
161 return serializedToken; in serializeVerificationToken()
165 const std::vector<uint8_t>& serializedToken) { in deserializeVerificationToken() argument
166 if (serializedToken.size() < 24) { in deserializeVerificationToken()
167 LOG(ERROR) << "Unexpected serialized VerificationToken size " << serializedToken.size() in deserializeVerificationToken()
172 token.challenge = extractUint64(serializedToken, 0); in deserializeVerificationToken()
173 token.timestamp = extractUint64(serializedToken, 8); in deserializeVerificationToken()
174 token.securityLevel = SecurityLevel(extractUint32(serializedToken, 16)); in deserializeVerificationToken()
175 size_t macSize = extractUint32(serializedToken, 20); in deserializeVerificationToken()
177 if (serializedToken.size() != expectedSerializedSize) { in deserializeVerificationToken()
178 LOG(ERROR) << "Unexpected serialized VerificationToken size " << serializedToken.size() in deserializeVerificationToken()
183 token.mac = std::vector<uint8_t>(serializedToken.begin() + 24, serializedToken.end()); in deserializeVerificationToken()