Fix Readme
This commit is contained in:
parent
595426570c
commit
2afa64b642
54
README.md
54
README.md
@ -1,7 +1,59 @@
|
||||
# P2FA
|
||||
|
||||
Hardware 2FA Manager
|
||||
### Hardware 2FA Manager
|
||||
|
||||
- https://www.adafruit.com/product/4282
|
||||
- https://github.com/waveshareteam/e-Paper/tree/master
|
||||
- https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT_Manual#C
|
||||
|
||||
|
||||
### Prep build environment:
|
||||
- LG:
|
||||
```bash
|
||||
wget https://github.com/joan2937/lg/archive/master.zip
|
||||
unzip master.zip
|
||||
cd lg-master
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
- BCM2835
|
||||
```bash
|
||||
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz
|
||||
tar zxvf bcm2835-1.71.tar.gz
|
||||
cd bcm2835-1.71/
|
||||
sudo ./configure && sudo make && sudo make check && sudo make install
|
||||
```
|
||||
|
||||
### Required libs:
|
||||
- make
|
||||
- cmake
|
||||
- python3
|
||||
- python3-pip
|
||||
- gpiod
|
||||
- libgpiod-dev
|
||||
- libpng-dev
|
||||
- libncurses-dev
|
||||
|
||||
### Build
|
||||
`./build.sh`
|
||||
|
||||
Executable will be in the "c" directory
|
||||
If moving to an alternate directory, ensure the c/libs/libgo_p2fa.so is copied.<br><br>
|
||||
To add a config, create a text file in the ~/.totp directory (if it doesn't exist then create it). The name of the file will be what is populated on the device.<br>
|
||||
Ex: "google.txt" will be displayed as "google"<br><br>
|
||||
File Format:<br>
|
||||
```text
|
||||
key: (Base32 Key, REQUIRED)
|
||||
hash: (sha1, sha256, sha512, or hmac. OPTIONAL) (default is sha1)
|
||||
timestep: (int representing duration in seconds between codes, default is 30, OPTIONAL)
|
||||
counter: (int between 6 and 10 inclusive, HOTP counter, default is 6, OPTIONAL)
|
||||
digits: (int between 1 and 10 inclusive, how many digits to generate, default is 6, OPTIONAL)
|
||||
```
|
||||
Example:
|
||||
```text
|
||||
key: GGAMSYNKW3H7HEKK
|
||||
hash: sha1
|
||||
timestep: 30
|
||||
counter: 6
|
||||
digits: 6
|
||||
```
|
@ -37,7 +37,7 @@ int computeWidth(char* text, sFONT *font) {
|
||||
return (font->Width) * strlen(text);
|
||||
}
|
||||
|
||||
//TODO Put display to sleep after
|
||||
//TODO Put display to sleep after so many refreshes
|
||||
void code(UWORD *blackImage, char* confName) {
|
||||
int ch;
|
||||
while(1) {
|
||||
|
Loading…
Reference in New Issue
Block a user