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:
parent
760c3a9730
commit
5266fa53c8
4 changed files with 38 additions and 30 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue