google-authenticator-android | Open source fork of the Google Authenticator Android app | Authentication library
kandi X-RAY | google-authenticator-android Summary
kandi X-RAY | google-authenticator-android Summary
The Google Authenticator project includes implementations of one-time passcode generators for several mobile platforms, as well as a Pluggable Authentication Module (PAM). One-time passcodes are generated using open standards developed by the Initiative for Open Authentication (OATH) (which is unrelated to OAuth). Further documentation is available in the Wiki.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Initialize the Authenticator
- Sets the contextual action bar for the user
- Swaps the ids of two AccountIndexs
- Called when a context item is clicked
- Initializes the activity
- Creates a styled pincode with a 4 - digit string
- Removes trailing and trailing newlines
- Generates a passcode for the given secret
- Handle a touch event
- Binds all the field values provided by the constructor
- On touch events
- Callback for the drag event
- Creates a bitmap with the specified position
- This method is called when the application is granted
- Invoked when the activity is finished
- Create the status bar
- Intercept the touch event
- Create dialog
- Initializes the view
- Initializes the AuthenticatorActivity
- Sets the size of the barcode
- Puts the check state of an item
- Encodes a byte array into a string
- Region > drawable
- Draw the divider
- Updates the dimension with the desired width and height
google-authenticator-android Key Features
google-authenticator-android Examples and Code Snippets
Community Discussions
Trending Discussions on google-authenticator-android
QUESTION
(Solution) TL;DR: Google assumes the key string is base32 encoded; replacing any 1
with I
and 0
with O
. This must be decoded prior to hashing.
Original Question
I'm having difficulty having my code match up with GA. I even went chasing down counters +/- ~100,000 from the current time step and found nothing. I was very excited to see my function pass the SHA-1 tests in the RFC 6238 Appendix, however when applied to "real life" it seems to fail.
I went so far as to look at the open source code for Google Authenticator at Github (here). I used the key for testing: "qwertyuiopasdfgh"
. According to the Github code:
ANSWER
Answered 2020-Apr-07 at 20:51I was tempted to make my own Android application to implement TOTP for my project. I did continue looking at the Java code. With aid of downloading the git repository and grep -R
to find function calls I discovered my problem. To get the same pin codes as Google Authenticator the key is assumed to be base32 encoded and must be decoded prior to passing it to the hash algorithm.
There was a hint of this in getEnteredKey()
by replacing the 0
and 1
characters as these are not present in the base32 alphabet.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install google-authenticator-android
You can install the official (proprietary) version of Google Authenticator from the Google Play Store.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page