This is a TOTP (Time-Based One-Time Password) authenticator that adheres to RFC 6238. It utilizes the OpenSSL library for cryptographic operations. Secrets are securely stored in a file, encrypted using AES-256. The encrypted file can be transferred to different machines for usage.
Before building, ensure that you have OpenSSL library installed and that your compiler supports C++23. By default, the executable is located in the build
folder.
By default, Visual Studio Release build will statically link dependencies. You can install OpenSSL using vcpkg. Follow these steps:
-
Install OpenSSL using vcpkg:
vcpkg.exe install openssl:x64-windows-static
-
Integrate vcpkg with Visual Studio:
vcpkg.exe integrate install
-
Build the Visual Studio solution located in the
VisualStudio
folder.
If you're on Linux, run the following command to build Authenticator:
make
Prebuilt binaries for x64 Windows and Linux can be found here.
By default, The authenticator stores secrets in the file named Accounts
in the same folder. However, you can change this location by passing a command-line argument:
./Authenticator /path/to/secrets
After starting the program, you can use the following commands:
l
: List all accounts. Each account is numbered.[number]
: Generate a new OTP for the specified account number.a
: Add a new account. Use a QR code scanner (e.g., Barcodes Decoder) to decode the QR code, then enter the account details as prompted.d[number]
: Delete an existing account by its account number.c
: Change the password of the encrypted file.q
: Quit the program.
To generate a new OTP for the third account, enter 3
.
To add a new account, enter a
.
To delete the second account, enter d2
.
Contributions to this project are welcome! If you find any bugs or have suggestions for improvements, please open an issue or submit a pull request.
Authenticator is licensed under the MIT License.