| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static long | Returns: derived key-idversion of the key keyVersion, byte[] fingerprint of the key fingerprint)Derive a key-id from the given key fingerprint. |
| public static long | Returns: key-id32 byte fingerprint v5Fingerprint)Derive a 64 bit key-id from a version 5 LibrePGP fingerprint. |
| public static long | Returns: key-id20 byte fingerprint v4Fingerprint)Derive a 64 bit key-id from a version 4 OpenPGP fingerprint. |
| public static long | Returns: key-id32 byte fingerprint v6Fingerprint)Derive a 64 bit key-id from a version 6 OpenPGP fingerprint. |
| public static long | Returns: longbytes bytes)Convert the left-most 8 bytes from the given array to a long. |
| public static long | Returns: longbytes bytes)Convert the right-most 8 bytes from the given array to a long. |
| public static String | |
| public static long | Returns: key-IDbyte array bytes)Read a key-ID from the first 8 octets of the given byte array. |
| public static long | Returns: key-IDbyte array bytes, int offset offset)Read a key-ID from 8 octets of the given byte array starting at offset. |
| public static void | writeKeyID(long
keyID keyID, byte[] byte array bytes, int starting offset offset)Write the key-ID encoded as 8 octets to the given byte array, starting at index offset. |
| public static void | writeKeyID(long
keyID keyID, byte[] byte array bytes)Write the key-ID to the first 8 octets of the given byte array. |
| FingerprintUtil | back to summary |
|---|---|
| public FingerprintUtil() | |
| keyIdFromFingerprint | back to summary |
|---|---|
| public static long keyIdFromFingerprint(int keyVersion, byte[] fingerprint) Derive a key-id from the given key fingerprint. This method can derive key-ids from v4, v5 (LibrePGP) and v6 keys. For keys with other versions (2,3) it will return 0.
| |
| keyIdFromLibrePgpFingerprint | back to summary |
|---|---|
| public static long keyIdFromLibrePgpFingerprint(byte[] v5Fingerprint) Derive a 64 bit key-id from a version 5 LibrePGP fingerprint. For such keys, the key-id corresponds to the left-most 8 octets of the fingerprint.
| |
| keyIdFromV4Fingerprint | back to summary |
|---|---|
| public static long keyIdFromV4Fingerprint(byte[] v4Fingerprint) Derive a 64 bit key-id from a version 4 OpenPGP fingerprint. For v4 keys, the key-id corresponds to the right-most 8 octets of the fingerprint.
| |
| keyIdFromV6Fingerprint | back to summary |
|---|---|
| public static long keyIdFromV6Fingerprint(byte[] v6Fingerprint) Derive a 64 bit key-id from a version 6 OpenPGP fingerprint. For v6 keys, the key-id corresponds to the left-most 8 octets of the fingerprint.
| |
| longFromLeftMostBytes | back to summary |
|---|---|
| public static long longFromLeftMostBytes(byte[] bytes) Convert the left-most 8 bytes from the given array to a long.
| |
| longFromRightMostBytes | back to summary |
|---|---|
| public static long longFromRightMostBytes(byte[] bytes) Convert the right-most 8 bytes from the given array to a long.
| |
| prettifyFingerprint | back to summary |
|---|---|
| public static String prettifyFingerprint(byte[] fingerprint) | |
| readKeyID | back to summary |
|---|---|
| public static long readKeyID(byte[] bytes) Read a key-ID from the first 8 octets of the given byte array.
| |
| readKeyID | back to summary |
|---|---|
| public static long readKeyID(byte[] bytes, int offset) Read a key-ID from 8 octets of the given byte array starting at offset.
| |
| writeKeyID | back to summary |
|---|---|
| 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.
| |
| writeKeyID | back to summary |
|---|---|
| public static void writeKeyID(long keyID, byte[] bytes) Write the key-ID to the first 8 octets of the given byte array.
| |