7 lines
269 B
TypeScript
7 lines
269 B
TypeScript
// Shared by the console's importer page and its client parts.
|
|
|
|
/** The start of a key's fingerprint, for people to compare: "1a2b 3c4d 5e6f 7a8b". */
|
|
export function shortFingerprint(hex: string): string {
|
|
return (hex.slice(0, 16).match(/.{4}/g) ?? []).join(" ");
|
|
}
|