fixed length identifiers

This commit is contained in:
Vincent Breitmoser committed 2015-03-05 02:10:44 +01:00
1 parent 1f324be243
commit 9798ef7bfd
2 files changed
+4 -7

No files matched your search

@@ -66,10 +66,8 @@ public abstract class LinkedCookieResource extends LinkedResource {
}
public static String generate (Context context, byte[] fingerprint, int nonce) {
return "[Verifying my PGP key: openpgp4fpr:"
+ KeyFormattingUtils.convertFingerprintToHex(fingerprint) + "#" + Integer.toHexString(nonce) + "]";
return String.format("\"[Verifying my PGP key: openpgp4fpr:%s#%08x]\"",
KeyFormattingUtils.convertFingerprintToHex(fingerprint), nonce);
}
public static String generatePreview () {
@@ -41,9 +41,8 @@ public class DnsResource extends LinkedCookieResource {
public static String generateText (Context context, byte[] fingerprint, int nonce) {
return "pgpid+cookie="
+ KeyFormattingUtils.convertFingerprintToHex(fingerprint) + ";"
+ Integer.toHexString(nonce) + "";
return String.format("pgpid+cookie=%s;%08x",
KeyFormattingUtils.convertFingerprintToHex(fingerprint), nonce);
}