PgpOperators

Shared operator builders for signing, verification, and secret-key encryption.

Functions

Link copied to clipboard
fun contentSignerBuilder(algorithm: Int, useBcLightweight: Boolean, hashAlgorithm: Int = HashAlgorithmTags.SHA256): PGPContentSignerBuilder

Returns a content signer builder for the given public-key algorithm.

Link copied to clipboard
fun contentVerifierProvider(useBcLightweight: Boolean): PGPContentVerifierBuilderProvider

Returns a signature verifier provider matching the key material backend.

Link copied to clipboard
fun extractPrivateKey(secretKey: PGPSecretKey, passphrase: CharArray): PGPPrivateKey

Unlocks a secret key with passphrase, falling back to the alternate operator backend on failure.

Link copied to clipboard

Converts OpenPGP key-flags bitmask into human-readable capability labels.

Link copied to clipboard
fun secretKeyDecryptor(passphrase: CharArray, preferBc: Boolean): PBESecretKeyDecryptor

Builds a passphrase decryptor for unlocking secret key packets.

Link copied to clipboard
fun secretKeyEncryptor(passphrase: CharArray, useBcLightweight: Boolean): PBESecretKeyEncryptor

Builds a passphrase encryptor for protecting secret key packets (AES-256, SHA-1 S2K).

Link copied to clipboard
fun useBcForPublicKey(key: PGPPublicKey): Boolean

Returns whether BC lightweight operators should be used for key.