pebbleOTP
Time based One Time Password generator for pebble
- RFC6238 OTP (Google Authenticator)
- Battle.net OTP
- Get your OTP Secrets
- Secrets for Google Authenticator is already base32 encoded. just use it as
- Battle.net OTP Secret can be obtained by using python-bna(https://github.com/Adys/python-bna)
- python-bna saves secret in "~/.config/bna/bna.conf". this secret is hexlified. you should unhexlify and base32 encode it.
 
import base64, binascii
print base64.b32encode(binascii.unhexlify('YOUR_BATTLE_NET_SECRET'))- edit src/main.cto input the your OTP info
- edit OTP_INFO.- typecan be- totpGoogleor- totpBattlenet
- secretis your base32 encoded secret.
- descriptionis description.
- You want to add more OTP, just expand OTP_INFO variable. here is an example.
 
OTPInfo OTP_INFO[] = {
{
  .type = totpGoogle,
  .secret = "secretsecret",
  .description = "Github"
}, 
{
  .type = totpBattlenet,
  .secret = "battlenetotpsecret",
  .description = "Battle.net OTP!"
}, 
};- edit src/totp.cto setup default timezone
- variable TIMEZONEis an index forTIMEZONE_MAP. find your timezone offset from UTC inTIMEZONE_MAPand setTIMEZONEto your timezone index.
- Just build it and install on your pebble.