class PrivateKey
source · line 30public
public class PrivateKey private constructor(private var handle: ULong) : Closeable
- Supertype
Closeable - Inherited
fun dispose(): Unit· Closeable
An owned native asymmetric private key. Operations require a live key; close it when finished.
function publicKey
source · line 80public
public fun publicKey(): PublicKey
Returns an independently owned public-key handle that must be closed separately.
function close
source · line 93public
public override fun close(): Unit
- Overrides
close
Releases the native PrivateKey handle. Repeated closes are harmless; other operations after close fail.
property algorithm
source · line 34public
public val algorithm: KeyAlgorithm
get: public read-only
The recognized key family of this live key.
getter get
source · line 34public
get(): KeyAlgorithm
function toDer
source · line 84public
public fun toDer(): Array<Byte>
Exports the live PrivateKey as DER data in an independent managed value.
function toPem
source · line 88public
public fun toPem(): String
Exports the live PrivateKey as PEM data in an independent managed value.