lower case all fingerprints. fixes #1521

This commit is contained in:
Daniel Gultsch 2015-12-27 18:37:12 +01:00
parent c3bdec1ce9
commit 703d95fcf8

View file

@ -19,6 +19,7 @@ import java.util.Collection;
import java.util.Iterator; import java.util.Iterator;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.List; import java.util.List;
import java.util.Locale;
import eu.siacs.conversations.Config; import eu.siacs.conversations.Config;
import eu.siacs.conversations.R; import eu.siacs.conversations.R;
@ -94,7 +95,7 @@ public final class CryptoHelper {
} else if (fingerprint.length() < 40) { } else if (fingerprint.length() < 40) {
return fingerprint; return fingerprint;
} }
StringBuilder builder = new StringBuilder(fingerprint.replaceAll("\\s","")); StringBuilder builder = new StringBuilder(fingerprint.toLowerCase(Locale.US).replaceAll("\\s", ""));
for(int i=8;i<builder.length();i+=9) { for(int i=8;i<builder.length();i+=9) {
builder.insert(i, ' '); builder.insert(i, ' ');
} }