1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-12-08 21:31:08 +01:00

Progress porting the example tests

This commit is contained in:
Paul Schaub 2025-02-17 14:36:43 +01:00
parent 760c3a9730
commit 5266fa53c8
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
4 changed files with 38 additions and 30 deletions

View file

@ -132,6 +132,8 @@ class PGPainless(
if (key is PGPSecretKeyRing) ArmorUtils.toAsciiArmoredString(key)
else ArmorUtils.toAsciiArmoredString(key as PGPPublicKeyRing)
@JvmStatic fun asciiArmor(cert: OpenPGPCertificate) = asciiArmor(cert.pgpKeyRing)
/**
* Wrap a key of certificate in ASCII armor and write the result into the given
* [OutputStream].
@ -204,6 +206,8 @@ class PGPainless(
fun inspectKeyRing(key: PGPKeyRing, referenceTime: Date = Date()) =
KeyRingInfo(key, referenceTime)
@JvmStatic
@JvmOverloads
fun inspectKeyRing(key: OpenPGPCertificate, referenceTime: Date = Date()) =
KeyRingInfo(key, getPolicy(), referenceTime)