Encodable

Represents cryptographic material that can be encoded to bytes in a given EncodingFormat. Typically implemented by key types to support encoding into formats like DER, PEM, JWK, or RAW.

For the decoding counterpart, see Decoder.

Inheritors

Functions

Link copied to clipboard
open suspend fun encodeToByteArray(format: F): ByteArray

Encodes this material into a ByteArray in the specified format.

Link copied to clipboard
abstract fun encodeToByteArrayBlocking(format: F): ByteArray

Encodes this material into a ByteArray in the specified format.

Link copied to clipboard
open suspend fun encodeToByteString(format: F): ByteString

Encodes this material into a ByteString in the specified format.

Link copied to clipboard

Encodes this material into a ByteString in the specified format.