Skip to content

Commit f129a33

Browse files
committed
PGPKeyRing: Add getKeyIdentifier()
1 parent c931f24 commit f129a33

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pg/src/main/java/org/bouncycastle/openpgp/PGPKeyRing.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@ static void readUserIDs(
9393
}
9494
}
9595

96+
/**
97+
* Return the {@link KeyIdentifier} of this key rings primary key.
98+
*
99+
* @return primary key identifier
100+
*/
101+
public KeyIdentifier getKeyIdentifier()
102+
{
103+
return getPublicKey().getKeyIdentifier();
104+
}
105+
96106
/**
97107
* Return the first public key in the ring. In the case of a {@link PGPSecretKeyRing}
98108
* this is also the public key of the master key pair.

0 commit comments

Comments
 (0)