diff options
author | Nick Bray <ncbray@google.com> | 2018-11-05 16:32:32 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-11-05 16:32:32 -0800 |
commit | 38b200dc21defe31742b6beb7da705ffbf29a3c3 (patch) | |
tree | e78593bde7eedd8f39dce50eba8cb3fd4a8fbb47 | |
parent | 05644ba3e40dcc9a1bb8cb6b249b24ffac84873a (diff) | |
parent | 27748e24c1a1fbfb2919817333b6270ace62c16c (diff) | |
download | gatekeeper-38b200dc21defe31742b6beb7da705ffbf29a3c3.tar.gz |
Replace htonl with htobe32.
am: 27748e24c1
Change-Id: I1d24232cb06c288b8d2d616f63a7f0f84bba0ea4
-rw-r--r-- | gatekeeper.cpp | 2 | ||||
-rw-r--r-- | tests/gatekeeper_device_test.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gatekeeper.cpp b/gatekeeper.cpp index 052c4db..1d71684 100644 --- a/gatekeeper.cpp +++ b/gatekeeper.cpp @@ -232,7 +232,7 @@ void GateKeeper::MintAuthToken(UniquePtr<uint8_t> *auth_token, uint32_t *length, token->challenge = challenge; token->user_id = user_id; token->authenticator_id = authenticator_id; - token->authenticator_type = htonl(HW_AUTH_PASSWORD); + token->authenticator_type = htobe32(HW_AUTH_PASSWORD); token->timestamp = htobe64(timestamp); const uint8_t *auth_token_key = NULL; diff --git a/tests/gatekeeper_device_test.cpp b/tests/gatekeeper_device_test.cpp index 0e7ace6..f166ca8 100644 --- a/tests/gatekeeper_device_test.cpp +++ b/tests/gatekeeper_device_test.cpp @@ -98,7 +98,7 @@ TEST_F(GateKeeperDeviceTest, EnrollAndVerify) { hat = reinterpret_cast<hw_auth_token_t *>(auth_token); ASSERT_EQ(HW_AUTH_TOKEN_VERSION, hat->version); - ASSERT_EQ(htonl(HW_AUTH_PASSWORD), hat->authenticator_type); + ASSERT_EQ(htobe32(HW_AUTH_PASSWORD), hat->authenticator_type); } TEST_F(GateKeeperDeviceTest, EnrollAndVerifyTimeout) { |