Fix the andOTP and FreeOTP importers

pull/120/head
Alexander Bakker 7 years ago
parent 5000522381
commit 3f979843c7

@ -43,7 +43,7 @@ public class AndOtpImporter extends DatabaseImporter {
for (int i = 0; i < _obj.length(); i++) {
JSONObject obj = _obj.getJSONObject(i);
String type = obj.getString("type");
String type = obj.getString("type").toLowerCase();
String algo = obj.getString("algorithm");
int digits = obj.getInt("digits");
byte[] secret = Base32.decode(obj.getString("secret").toCharArray());

@ -56,7 +56,7 @@ public class FreeOtpImporter extends DatabaseImporter {
} else {
JSONObject obj = new JSONObject(xmlEntry.Value);
String type = obj.getString("type");
String type = obj.getString("type").toLowerCase();
String algo = obj.getString("algo");
int digits = obj.getInt("digits");
byte[] secret = toBytes(obj.getJSONArray("secret"));

Loading…
Cancel
Save