MgetPrivateKey
Bun

method

crypto.ECDH.getPrivateKey

getPrivateKey(): NonSharedBuffer;

If encoding is specified, a string is returned; otherwise a Buffer is returned.

@returns

The EC Diffie-Hellman in the specified encoding.

): string;

If encoding is specified, a string is returned; otherwise a Buffer is returned.

@param encoding

The encoding of the return value.

@returns

The EC Diffie-Hellman in the specified encoding.

Referenced types

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