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
1 changed files with 13 additions and 1 deletions

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.
*