Package-level declarations

Types

Link copied to clipboard
data class AddSubkeyRequest(val secretKeyRingArmored: ByteArray, val passphrase: CharArray, val subkeyType: SubkeyType, val rsaBits: Int = 3072)

Parameters for adding a subkey to an existing secret key ring.

Link copied to clipboard

Maps OpenPGP algorithm tags and key-type enums to display strings.

Link copied to clipboard

BC lightweight ECDSA and ECDH key pairs on NIST curves.

Link copied to clipboard
object BcKeyPairs

BC lightweight generators for Curve25519 and Ed448 family keys.

Link copied to clipboard

Lazily registers the Bouncy Castle JCA provider on first access.

Link copied to clipboard

OpenPGP certification trust levels. BC 1.79 names differ from the RFC: PERSONA maps to PGPSignature.NO_CERTIFICATION (0x11), GENERIC to PGPSignature.DEFAULT_CERTIFICATION (0x10).

Link copied to clipboard
data class CertifyKeyRequest(val certifierSecretArmored: ByteArray, val certifierPassphrase: CharArray, val targetPublicArmored: ByteArray, val userId: String, val certificationType: CertificationType = CertificationType.POSITIVE)

Parameters for certifying a user ID on a target public key.

Link copied to clipboard
data class CertifyKeyResult(val certifiedPublicArmored: ByteArray)

Armored public key ring including the new certification.

Link copied to clipboard
data class ChangePassphraseRequest(val secretKeyRingArmored: ByteArray, val oldPassphrase: CharArray, val newPassphrase: CharArray)

Parameters for changing the passphrase on a secret key ring.

Link copied to clipboard
data class DecryptRequest(val ciphertext: ByteArray, val secretKeyRingArmored: ByteArray, val passphrase: CharArray)

Parameters for decrypting an OpenPGP message.

Link copied to clipboard
data class DecryptResult(val plaintext: ByteArray, val fileName: String?, val verified: Boolean, val securityProblems: List<SecurityProblem>)

Result of a successful decryption.

Link copied to clipboard

NIST elliptic curves supported for JCA and BC lightweight key generation.

Link copied to clipboard
data class EncryptRequest(val plaintext: ByteArray, val recipientKeyRings: List<ByteArray>, val asciiArmor: Boolean = true, val fileName: String = PGPLiteralData.CONSOLE)

Parameters for encrypting a message to OpenPGP recipients.

Link copied to clipboard
data class EncryptResult(val ciphertext: ByteArray)

Encrypted (and optionally armored) OpenPGP message bytes.

Link copied to clipboard
data class GeneratedKeyRing(val publicArmored: ByteArray, val secretArmored: ByteArray, val masterKeyId: Long)

Result of a successful key ring generation.

Link copied to clipboard
data class GenerateKeyRequest(val userId: String, val passphrase: CharArray, val algorithmType: KeyAlgorithmType = KeyAlgorithmType.RSA, val rsaBits: Int = 3072)

Parameters for generating a new OpenPGP key ring.

Link copied to clipboard
class GpgTar

Encrypts and decrypts multi-file archives wrapped in OpenPGP messages.

Link copied to clipboard
data class GpgTarDecryptRequest(val ciphertext: ByteArray, val secretKeyRingArmored: ByteArray, val passphrase: CharArray)

Decrypt request for a GpgTar-encrypted archive.

Link copied to clipboard
data class GpgTarEncryptRequest(val files: List<NamedFile>, val recipientKeyRings: List<ByteArray>, val asciiArmor: Boolean = true)

Encrypt request: multiple files to one OpenPGP ciphertext.

Link copied to clipboard

Android-aware JCA key generation and digest providers for OpenPGP.

Link copied to clipboard

Primary key algorithm presets for new OpenPGP key ring generation.

Link copied to clipboard

Certifies user IDs on third-party OpenPGP public keys.

Link copied to clipboard

Generates new OpenPGP key rings with master, encryption, and authentication subkeys.

Link copied to clipboard

Factory that produces algorithm-specific signing, encryption, and authentication key pairs.

Link copied to clipboard

Re-encrypts secret key rings with a new passphrase.

Link copied to clipboard

Converts armored secret key rings to armored public key rings.

Link copied to clipboard

Reads OpenPGP key rings and maps them to KeyRingInfo.

Link copied to clipboard
data class NamedFile(val name: String, val data: ByteArray)

A named file entry in a GpgTar archive.

Link copied to clipboard

Allowed algorithms, defaults, and key-ring validation for OpenPGP operations.

Link copied to clipboard

Decrypts OpenPGP messages and validates integrity protection.

Link copied to clipboard

Encrypts data to OpenPGP public-key recipients.

Link copied to clipboard
class PgpException(message: String, val securityProblem: SecurityProblem? = null, cause: Throwable? = null) : Exception

General PGP engine failure.

Link copied to clipboard
object PgpIo

Size-limited stream copy and read utilities.

Link copied to clipboard

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

Link copied to clipboard

Cryptographic constants for secret-key packet construction and protection.

Link copied to clipboard
class PgpSigner

Signs messages and produces cleartext or detached OpenPGP signatures.

Link copied to clipboard
object PgpStreams

Utilities for decoding OpenPGP packet streams.

Link copied to clipboard

Verifies OpenPGP cleartext and detached signatures.

Link copied to clipboard
data class RemoveSubkeyRequest(val secretKeyRingArmored: ByteArray, val subkeyId: Long)

Parameters for removing a subkey from a secret key ring.

Link copied to clipboard

Merges armored revocation signatures into public or secret key rings.

Link copied to clipboard

Generates armored OpenPGP key revocation signatures from a secret key ring.

Link copied to clipboard
data class RevocationCertRequest(val secretKeyRingArmored: ByteArray, val passphrase: CharArray, val reason: Byte = RevocationReasonTags.NO_REASON, val reasonText: String = "")

Parameters for generating a key revocation certificate.

Link copied to clipboard

Shared secure random source for key generation and IV/salt creation.

Link copied to clipboard

Structured security problem detected during verify or decrypt operations.

Link copied to clipboard
data class SignRequest(val data: ByteArray, val secretKeyRingArmored: ByteArray, val passphrase: CharArray, val cleartext: Boolean = true, val detachedBinary: Boolean = false)

Parameters for signing data with an OpenPGP secret key ring.

Link copied to clipboard
data class SignResult(val output: ByteArray)

Armored signature output from PgpSigner.sign.

Link copied to clipboard
interface SmartCardPort

Port for hardware-backed signing and session-key decryption.

Link copied to clipboard

S/MIME engine stub. All operations throw PgpException until CMS support is implemented.

Link copied to clipboard

Adds a subkey to an existing secret key ring.

Link copied to clipboard

Removes non-master subkeys from OpenPGP secret key rings.

Link copied to clipboard

Subkey kinds that can be added to an existing secret key ring.

Link copied to clipboard

AES-256-GCM cipher with PBKDF2-HMAC-SHA256 key derivation.

Link copied to clipboard
data class SymmetricDecryptRequest(val ciphertext: ByteArray, val password: CharArray)

Ciphertext blob and password for symmetric decryption.

Link copied to clipboard
data class SymmetricEncryptRequest(val plaintext: ByteArray, val password: CharArray)

Plaintext and password for symmetric encryption.

Link copied to clipboard
data class UserIdEditRequest(val secretKeyRingArmored: ByteArray, val passphrase: CharArray, val userId: String)

Parameters for a user ID edit operation on a secret key ring.

Link copied to clipboard

Adds, revokes, and reorders user IDs on OpenPGP master keys.

Link copied to clipboard
data class VerifyRequest(val signedOrDetached: ByteArray, val detachedMessage: ByteArray? = null, val publicKeyRingsArmored: List<ByteArray> = emptyList(), val binaryDocument: Boolean = false)

Input for signature verification.

Link copied to clipboard
data class VerifyResult(val valid: Boolean, val signerKeyId: Long? = null, val message: ByteArray? = null, val error: String? = null)

Outcome of a verification attempt.