Use GoogleAuthInfo.parseSecret for secrets from Google Authenticator

This commit is contained in:
Alexander Bakker 2020-12-26 12:16:57 +01:00
parent 1f2e45fd12
commit f012c7ce22

View file

@ -4,8 +4,8 @@ import android.content.Context;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.database.Cursor; import android.database.Cursor;
import com.beemdevelopment.aegis.encoding.Base32;
import com.beemdevelopment.aegis.encoding.EncodingException; import com.beemdevelopment.aegis.encoding.EncodingException;
import com.beemdevelopment.aegis.otp.GoogleAuthInfo;
import com.beemdevelopment.aegis.otp.HotpInfo; import com.beemdevelopment.aegis.otp.HotpInfo;
import com.beemdevelopment.aegis.otp.OtpInfo; import com.beemdevelopment.aegis.otp.OtpInfo;
import com.beemdevelopment.aegis.otp.OtpInfoException; import com.beemdevelopment.aegis.otp.OtpInfoException;
@ -73,7 +73,7 @@ public class GoogleAuthImporter extends DatabaseImporter {
private static VaultEntry convertEntry(Entry entry) throws DatabaseImporterEntryException { private static VaultEntry convertEntry(Entry entry) throws DatabaseImporterEntryException {
try { try {
byte[] secret = Base32.decode(entry.getSecret()); byte[] secret = GoogleAuthInfo.parseSecret(entry.getSecret());
OtpInfo info; OtpInfo info;
switch (entry.getType()) { switch (entry.getType()) {