• Home
  • Raw
  • Download

Lines Matching refs:token

59 hidl_vec<uint8_t> authToken2HidlVec(const HardwareAuthToken& token) {  in authToken2HidlVec()  argument
60 static_assert(1 /* version size */ + sizeof(token.challenge) + sizeof(token.userId) + in authToken2HidlVec()
61 sizeof(token.authenticatorId) + sizeof(token.authenticatorType) + in authToken2HidlVec()
62 sizeof(token.timestamp) + kHmacSize == in authToken2HidlVec()
70 pos = copy_bytes_to_iterator(token.challenge, pos); in authToken2HidlVec()
71 pos = copy_bytes_to_iterator(token.userId, pos); in authToken2HidlVec()
72 pos = copy_bytes_to_iterator(token.authenticatorId, pos); in authToken2HidlVec()
73 auto auth_type = htonl(static_cast<uint32_t>(token.authenticatorType)); in authToken2HidlVec()
75 auto timestamp = htonq(token.timestamp); in authToken2HidlVec()
77 if (token.mac.size() != kHmacSize) { in authToken2HidlVec()
80 std::copy(token.mac.begin(), token.mac.end(), pos); in authToken2HidlVec()
87 HardwareAuthToken token; in hidlVec2AuthToken() local
88 static_assert(1 /* version size */ + sizeof(token.challenge) + sizeof(token.userId) + in hidlVec2AuthToken()
89 sizeof(token.authenticatorId) + sizeof(token.authenticatorType) + in hidlVec2AuthToken()
90 sizeof(token.timestamp) + kHmacSize == in hidlVec2AuthToken()
98 pos = copy_bytes_from_iterator(&token.challenge, pos); in hidlVec2AuthToken()
99 pos = copy_bytes_from_iterator(&token.userId, pos); in hidlVec2AuthToken()
100 pos = copy_bytes_from_iterator(&token.authenticatorId, pos); in hidlVec2AuthToken()
101 pos = copy_bytes_from_iterator(&token.authenticatorType, pos); in hidlVec2AuthToken()
102 token.authenticatorType = static_cast<HardwareAuthenticatorType>( in hidlVec2AuthToken()
103 ntohl(static_cast<uint32_t>(token.authenticatorType))); in hidlVec2AuthToken()
104 pos = copy_bytes_from_iterator(&token.timestamp, pos); in hidlVec2AuthToken()
105 token.timestamp = ntohq(token.timestamp); in hidlVec2AuthToken()
106 token.mac.resize(kHmacSize); in hidlVec2AuthToken()
107 std::copy(pos, pos + kHmacSize, token.mac.data()); in hidlVec2AuthToken()
109 return token; in hidlVec2AuthToken()