KeyIdentifier can be created from either a 64-bit key-id, a fingerprint, or both.
This class was created to enable a seamless transition from use of key-ids in the API
towards identifying keys via fingerprints.
| Modifier and Type | Field and Description |
|---|---|
| private final byte[] | |
| private final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | KeyIdentifier(byte[]
fingerprint fingerprint, long key-id keyId)Create a |
| public | KeyIdentifier(long
key-id keyId)Create a |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public byte[] | |
| public long | |
| public boolean | Returns: true if there's a match, false otherwise.the fingerprint to match against. fingerprint)Return true if the KeyIdentifier has a fingerprint corresponding to the passed in one. |
| public int | |
| public boolean | Returns: true, if the identifier is present in the list, false otherwise.the list of key identifiers to check. others)Return true, if this |
| public boolean | Returns: is wildcardReturns true, if the |
| public boolean | Returns: true if we match other, false otherwise.the identifier we are matching against. other)Return true, if this |
| public static boolean | |
| public String | |
| public static KeyIdentifier |
| fingerprint | back to summary |
|---|---|
| private final byte[] fingerprint | |
| keyId | back to summary |
|---|---|
| private final long keyId | |
| KeyIdentifier | back to summary |
|---|---|
| public KeyIdentifier(String hexEncoded) | |
| KeyIdentifier | back to summary |
|---|---|
| public KeyIdentifier(byte[] fingerprint) Create a new
| |
| KeyIdentifier | back to summary |
|---|---|
| public KeyIdentifier(byte[] fingerprint, long keyId) Create a
| |
| KeyIdentifier | back to summary |
|---|---|
| public KeyIdentifier(long keyId) Create a
| |
| KeyIdentifier | back to summary |
|---|---|
| private KeyIdentifier() Create a wildcard | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getFingerprint | back to summary |
|---|---|
| public byte[] getFingerprint() Return the fingerprint of the
| |
| getKeyId | back to summary |
|---|---|
| public long getKeyId() Return the key-id of the
| |
| hasFingerprint | back to summary |
|---|---|
| public boolean hasFingerprint(byte[] fingerprint) Return true if the KeyIdentifier has a fingerprint corresponding to the passed in one.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isPresentIn | back to summary |
|---|---|
| public boolean isPresentIn(List<KeyIdentifier> others) Return true, if this
| |
| isWildcard | back to summary |
|---|---|
| public boolean isWildcard() Returns true, if the
| |
| matches | back to summary |
|---|---|
| public boolean matches(KeyIdentifier other) Return true, if this
| |
| matches | back to summary |
|---|---|
| public static boolean matches(List<KeyIdentifier> identifiers, KeyIdentifier identifier, boolean explicit) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| wildcard | back to summary |
|---|---|
| public static KeyIdentifier wildcard() Create a wildcard
| |