Scoop API

scoop:scoop.crypto:0.1.0

PrivateKey

class PrivateKey

source · line 30
public
public class PrivateKey private constructor(private var handle: ULong) : Closeable

An owned native asymmetric private key. Operations require a live key; close it when finished.

function publicKey

source · line 80
public
public fun publicKey(): PublicKey

Returns an independently owned public-key handle that must be closed separately.

function close

source · line 93
public
public override fun close(): Unit

Releases the native PrivateKey handle. Repeated closes are harmless; other operations after close fail.

function toDer

source · line 84
public
public fun toDer(): Array<Byte>

Exports the live PrivateKey as DER data in an independent managed value.

function toPem

source · line 88
public
public fun toPem(): String

Exports the live PrivateKey as PEM data in an independent managed value.