<PackageReference Include="BouncyCastle.Cryptography" Version="2.7.0" />

Org.BouncyCastle.Bcpg.FingerprintUtilities

public static class FingerprintUtilities
public static long KeyIDFromFingerprint(int keyVersion, byte[] fingerprint)

Derive a key-id from the given key fingerprint.

public static long KeyIDFromLibrePgpFingerprint(byte[] v5Fingerprint)

Derive a 64 bit key-id from a version 5 LibrePGP fingerprint.

public static long KeyIDFromV4Fingerprint(byte[] v4Fingerprint)

Derive a 64 bit key-id from a version 4 OpenPGP fingerprint.

public static long KeyIDFromV6Fingerprint(byte[] v6Fingerprint)

Derive a 64 bit key-id from a version 6 OpenPGP fingerprint.

public static long LongFromLeftMostBytes(byte[] bytes)

Convert the left-most 8 bytes from the given array to a long.

public static long LongFromRightMostBytes(byte[] bytes)

Convert the right-most 8 bytes from the given array to a long.

public static long ReadKeyID(byte[] bytes, int offset)

Read a key-ID from 8 octets of the given byte array starting at offset.

public static void WriteKeyID(long keyID, byte[] bytes, int offset)

Write the key-ID encoded as 8 octets to the given byte array, starting at index offset.