aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid M. Syzdek <david@syzdek.net>2023-01-10 02:03:47 -0900
committerDavid M. Syzdek <david@syzdek.net>2023-01-10 02:03:47 -0900
commit748afbfe81ecd4a1ee3de4b9332e66261efef033 (patch)
treed0ade580deb0d588d991e91182cbca2f029835ca
parentd9da2cfc96a217f2962b4db3e890db1d43ef7d6c (diff)
downloadotputils-748afbfe81ecd4a1ee3de4b9332e66261efef033.tar.gz
otputils-748afbfe81ecd4a1ee3de4b9332e66261efef033.tar.bz2
otputils-748afbfe81ecd4a1ee3de4b9332e66261efef033.tar.xz
otputils-748afbfe81ecd4a1ee3de4b9332e66261efef033.zip
totp-example: adjusting white space
-rw-r--r--examples/totp-example.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/totp-example.c b/examples/totp-example.c
index 025e410..ba06e9d 100644
--- a/examples/totp-example.c
+++ b/examples/totp-example.c
@@ -220,10 +220,10 @@ int main(int argc, char * argv[])
220 220
221 // dynamically truncates hash 221 // dynamically truncates hash
222 offset = hmac_result[19] & 0x0f; 222 offset = hmac_result[19] & 0x0f;
223 bin_code = (hmac_result[offset] & 0x7f) << 24 223 bin_code = (hmac_result[offset] & 0x7f) << 24
224 | (hmac_result[offset+1] & 0xff) << 16 224 | (hmac_result[offset+1] & 0xff) << 16
225 | (hmac_result[offset+2] & 0xff) << 8 225 | (hmac_result[offset+2] & 0xff) << 8
226 | (hmac_result[offset+3] & 0xff) ; 226 | (hmac_result[offset+3] & 0xff) ;
227 227
228 // truncates code to 6 digits 228 // truncates code to 6 digits
229 totp = bin_code % 1000000; 229 totp = bin_code % 1000000;