fetchKey

fun fetchKey(baseUrl: String, query: String): ByteArray

Fetches an armored public key from baseUrl matching query.

Return

Armored PGP public key bytes.

Parameters

baseUrl

Keyserver base URL (e.g. https://keys.openpgp.org).

query

Email address, 40-hex fingerprint, or 8–16 hex key id.

Throws

on HTTP errors, empty responses, or non-PGP payloads.