MsetPublicKey
Bun

method

crypto.DiffieHellman.setPublicKey

publicKey: ArrayBufferView
): void;

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.

publicKey: string,
encoding: BufferEncoding
): void;

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.

@param encoding

The encoding of the publicKey string.