Merge commit '816dce0334e8b8d9da3cb00d31d26033b17040a3'

This commit is contained in:
Vincent Breitmoser
2015-11-13 17:00:09 +01:00
4 changed files with 29 additions and 15 deletions

View File

@@ -117,7 +117,7 @@ public class PgpHelper {
}
}
public static String getPgpContent(@NonNull CharSequence input) {
public static String getPgpMessageContent(@NonNull CharSequence input) {
Log.dEscaped(Constants.TAG, "input: " + input);
Matcher matcher = PgpHelper.PGP_MESSAGE.matcher(input);
@@ -141,4 +141,18 @@ public class PgpHelper {
}
}
public static String getPgpKeyContent(@NonNull CharSequence input) {
Log.dEscaped(Constants.TAG, "input: " + input);
Matcher matcher = PgpHelper.PGP_PUBLIC_KEY.matcher(input);
if (matcher.matches()) {
String text = matcher.group(1);
text = fixPgpMessage(text);
Log.dEscaped(Constants.TAG, "input fixed: " + text);
return text;
}
return null;
}
}