setPublicKey

fun setPublicKey(publicKey: <Error class: unknown class><out <Error class: unknown class>>)(source)

Sets the Diffie-Hellman public key. If the encoding argument is provided, publicKey is expected to be a string. If no encoding is provided, publicKey is expected to be a Buffer, TypedArray, or DataView.

Since

v0.5.0

Parameters

encoding

The encoding of the publicKey string.


fun setPublicKey(publicKey: String, encoding: BufferEncoding)(source)