beemdevelopment/Aegis · error
Unsupported algorithm
Error message
Unsupported algorithm: %d
What it means
The final field mapped per payload entry is the OTP type. Aegis supports OTP_TYPE_TOTP and OTP_TYPE_HOTP (unspecified falls through to TOTP); any other OtpType enum value reaches the default branch and throws this exception.
Solutions
- Only include TOTP/HOTP tokens in the export payload
- Regenerate the export with a compatible exporter version
- If producing payloads, set OtpType to OTP_TYPE_TOTP or OTP_TYPE_HOTP explicitly
Example fix
// before parameters.setType(OTP_TYPE_STEAM); // unsupported in migration payload // after parameters.setType(GoogleAuthProtos.MigrationPayload.OtpType.OTP_TYPE_TOTP);
Defensive patterns
Strategy: try-catch
Try / catch
try {
GoogleAuthInfo.parseExportUri(uri);
} catch (GoogleAuthInfoException e) {
Log.w(TAG, "Token skipped: " + e.getMessage());
} Prevention
- Export only TOTP/HOTP tokens
- Update Aegis before importing exports from a newer Authenticator version
- Per-entry error handling during batch import
When it happens
Trigger: Parsing a migration payload where params.getType() is an enum value other than UNSPECIFIED, TOTP, or HOTP (e.g. an unknown type added by a newer exporter).
Common situations: Payloads from newer Authenticator versions with new OTP types, or hand-built protobuf payloads with invalid type ordinals.
Related errors
- Unsupported digits
- Unsupported hash algorithm
- Type unsupported by GoogleAuthProtos
- unsupported otp type:
- unsupported otp type:
AI-assisted analysis of beemdevelopment/Aegis@d6f4e5925a (2026-09-08).
Data as JSON: /api/errors/c56412981be8426d.
Report an issue: GitHub.
Appendix: source
Thrown at app/src/main/java/com/beemdevelopment/aegis/otp/GoogleAuthInfo.java:253
throw new GoogleAuthInfoException(uri, String.format("Unsupported hash algorithm: %d", params.getAlgorithm().ordinal()));
}
byte[] secret = params.getSecret().toByteArray();
if (secret.length == 0) {
throw new GoogleAuthInfoException(uri, "Secret is empty");
}
switch (params.getType()) {
case OTP_TYPE_UNSPECIFIED:
// intentional fallthrough
case OTP_TYPE_TOTP:
otp = new TotpInfo(secret, algo, digits, TotpInfo.DEFAULT_PERIOD);
break;
case OTP_TYPE_HOTP:
otp = new HotpInfo(secret, algo, digits, params.getCounter());
break;
default:
throw new GoogleAuthInfoException(uri, String.format("Unsupported algorithm: %d", params.getType().ordinal()));
}
} catch (OtpInfoException e) {
throw new GoogleAuthInfoException(uri, e);
}
String name = params.getName();
String issuer = params.getIssuer();
int colonI = name.indexOf(':');
if (issuer.isEmpty() && colonI != -1) {
issuer = name.substring(0, colonI);
name = name.substring(colonI + 1);
}
GoogleAuthInfo info = new GoogleAuthInfo(otp, name, issuer);
infos.add(info);
}
return new Export(infos, payload.getBatchId(), payload.getBatchIndex(), payload.getBatchSize());View on GitHub (pinned to d6f4e5925a)