freeotp / freeotp-android

Apache License 2.0
1.37k stars 290 forks source link

Importing and secrets format #368

Open ajdelgado opened 9 months ago

ajdelgado commented 9 months ago

Since as today andOTP is dead I wanted to move to FreeOTP. But one big issue is the way FreeOTP stores secrets in the exports. I have used 2 or 3 apps in Linux and Android for OTP and their exported secrets usually are a string of numbers and character in capitals like 73G5GA77XF1IYUQF but FreeOTP uses a list of numbers. Looking to reverse this tool https://gitlab.com/stavros/freeotp-to-andotp-migrator/-/blob/master/freeotp_migrate.py that does migrate from FreeOTP to andOTP in the line 19 it does and AND operation. But my math skills are not great and I don't know how to make it the way around from a string to a list of numbers. Like I said most other apps store the secret as the string, would be nice to follow that trend. But if not, who is calculated the list of numbers? This is the last piece I need to make a Python script to convert from andOTP to FreeOTP, and then I might also include to export from Authenticator Thanks!

ajdelgado commented 9 months ago

In the meanwhile I added an option to output as a list of URIs that worked to migrate from andOTP to FreeOTP https://codeberg.org/adelgado/andotp2freeotp