fixed length identifiers
This commit is contained in:
@@ -66,10 +66,8 @@ public abstract class LinkedCookieResource extends LinkedResource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String generate (Context context, byte[] fingerprint, int nonce) {
|
public static String generate (Context context, byte[] fingerprint, int nonce) {
|
||||||
|
return String.format("\"[Verifying my PGP key: openpgp4fpr:%s#%08x]\"",
|
||||||
return "[Verifying my PGP key: openpgp4fpr:"
|
KeyFormattingUtils.convertFingerprintToHex(fingerprint), nonce);
|
||||||
+ KeyFormattingUtils.convertFingerprintToHex(fingerprint) + "#" + Integer.toHexString(nonce) + "]";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String generatePreview () {
|
public static String generatePreview () {
|
||||||
|
|||||||
@@ -41,9 +41,8 @@ public class DnsResource extends LinkedCookieResource {
|
|||||||
|
|
||||||
public static String generateText (Context context, byte[] fingerprint, int nonce) {
|
public static String generateText (Context context, byte[] fingerprint, int nonce) {
|
||||||
|
|
||||||
return "pgpid+cookie="
|
return String.format("pgpid+cookie=%s;%08x",
|
||||||
+ KeyFormattingUtils.convertFingerprintToHex(fingerprint) + ";"
|
KeyFormattingUtils.convertFingerprintToHex(fingerprint), nonce);
|
||||||
+ Integer.toHexString(nonce) + "";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user