1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-23 03:17:58 +01:00

Add and document PGPainless.inspectKeyRing(key, date)

This commit is contained in:
Paul Schaub 2022-03-07 10:36:20 +01:00
parent a7d1f09b5c
commit a6dcf027c0
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -116,7 +116,7 @@ public final class PGPainless {
* This method can be used to determine expiration dates, key flags and other information about a key.
*
* To evaluate a key at a given date (e.g. to determine if the key was allowed to create a certain signature)
* use {@link KeyRingInfo#KeyRingInfo(PGPKeyRing, Date)} instead.
* use {@link #inspectKeyRing(PGPKeyRing, Date)} instead.
*
* @param keyRing key ring
* @return access object
@ -125,6 +125,18 @@ public final class PGPainless {
return new KeyRingInfo(keyRing);
}
/**
* Quickly access information about a {@link org.bouncycastle.openpgp.PGPPublicKeyRing} / {@link PGPSecretKeyRing}.
* This method can be used to determine expiration dates, key flags and other information about a key at a specific time.
*
* @param keyRing key ring
* @param inspectionDate date of inspection
* @return access object
*/
public static KeyRingInfo inspectKeyRing(PGPKeyRing keyRing, Date inspectionDate) {
return new KeyRingInfo(keyRing, inspectionDate);
}
/**
* Access, and make changes to PGPainless policy on acceptable/default algorithms etc.
*