Skip to content

SshHostKeyPair

[Source]

Ed25519 key pair loaded from PEM. Holds a private key and can sign data.

class ref SshHostKeyPair

Constructors

create

[Source]

Parse PEM private key via BIO_new_mem_buf + PEM_read_bio_PrivateKey.

new ref create(
  pem_data: Array[U8 val] val)
: SshHostKeyPair ref^ ?

Parameters

Returns


Public fields

let algorithm: String val

[Source]


Public Functions

sign

[Source]

Sign data using EVP_DigestSign. For Ed25519, the md parameter is null.

fun box sign(
  data: Array[U8 val] val)
: (Array[U8 val] val | SshCryptoError)

Parameters

Returns


public_key

[Source]

Extract the public key as an SshHostKey.

fun box public_key()
: SshHostKey val

Returns