MgetPublicKey
Bun

method

crypto.DiffieHellman.getPublicKey

getPublicKey(): NonSharedBuffer;

Returns the Diffie-Hellman public key in the specified encoding. If encoding is provided a string is returned; otherwise a Buffer is returned.

): string;

Returns the Diffie-Hellman public key in the specified encoding. If encoding is provided a string is returned; otherwise a Buffer is returned.

@param encoding

The encoding of the return value.

Referenced types

type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex' | 'binary'