{"record":{"id":"c56412981be8426d","repo":"beemdevelopment/Aegis","slug":"unsupported-algorithm-d","errorCode":null,"errorMessage":"Unsupported algorithm: %d","messagePattern":"Unsupported algorithm: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/main/java/com/beemdevelopment/aegis/otp/GoogleAuthInfo.java","lineNumber":253,"sourceCode":"                        throw new GoogleAuthInfoException(uri, String.format(\"Unsupported hash algorithm: %d\", params.getAlgorithm().ordinal()));\n                }\n\n                byte[] secret = params.getSecret().toByteArray();\n                if (secret.length == 0) {\n                    throw new GoogleAuthInfoException(uri, \"Secret is empty\");\n                }\n\n                switch (params.getType()) {\n                    case OTP_TYPE_UNSPECIFIED:\n                        // intentional fallthrough\n                    case OTP_TYPE_TOTP:\n                        otp = new TotpInfo(secret, algo, digits, TotpInfo.DEFAULT_PERIOD);\n                        break;\n                    case OTP_TYPE_HOTP:\n                        otp = new HotpInfo(secret, algo, digits, params.getCounter());\n                        break;\n                    default:\n                        throw new GoogleAuthInfoException(uri, String.format(\"Unsupported algorithm: %d\", params.getType().ordinal()));\n                }\n            } catch (OtpInfoException e) {\n                throw new GoogleAuthInfoException(uri, e);\n            }\n\n            String name = params.getName();\n            String issuer = params.getIssuer();\n            int colonI = name.indexOf(':');\n            if (issuer.isEmpty() && colonI != -1) {\n                issuer = name.substring(0, colonI);\n                name = name.substring(colonI + 1);\n            }\n\n            GoogleAuthInfo info = new GoogleAuthInfo(otp, name, issuer);\n            infos.add(info);\n        }\n\n        return new Export(infos, payload.getBatchId(), payload.getBatchIndex(), payload.getBatchSize());","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/beemdevelopment/Aegis/blob/d6f4e5925a97e4e91593f1542085eae03432a759/app/src/main/java/com/beemdevelopment/aegis/otp/GoogleAuthInfo.java#L235-L271","documentation":"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.","triggerScenarios":"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).","commonSituations":"Payloads from newer Authenticator versions with new OTP types, or hand-built protobuf payloads with invalid type ordinals.","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"],"exampleFix":"// before\nparameters.setType(OTP_TYPE_STEAM); // unsupported in migration payload\n// after\nparameters.setType(GoogleAuthProtos.MigrationPayload.OtpType.OTP_TYPE_TOTP);","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    GoogleAuthInfo.parseExportUri(uri);\n} catch (GoogleAuthInfoException e) {\n    Log.w(TAG, \"Token skipped: \" + e.getMessage());\n}","preventionTips":["Export only TOTP/HOTP tokens","Update Aegis before importing exports from a newer Authenticator version","Per-entry error handling during batch import"],"tags":["otp","enum","protobuf"],"backgroundTag":"unsupported-enum-value","analyzedSha":"d6f4e5925a97e4e91593f1542085eae03432a759","analyzedAt":"2026-09-08T00:46:31.111Z","contentChangedAt":"2026-09-08T00:46:31.111Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}