method DiffieHellman.prototype.computeSecret
Jump to headingDiffieHellman.prototype.computeSecret(otherPublicKey: ArrayBufferView,inputEncoding?: null,outputEncoding?: null,): Buffer
Computes the shared secret using otherPublicKey
as the other
party's public key and returns the computed shared secret. The supplied
key is interpreted using the specified inputEncoding
, and secret is
encoded using specified outputEncoding
.
If the inputEncoding
is not
provided, otherPublicKey
is expected to be a Buffer
, TypedArray
, or DataView
.
If outputEncoding
is given a string is returned; otherwise, a Buffer
is returned.
Parameters Jump to heading
Jump to headingotherPublicKey: ArrayBufferView
optional
Jump to headinginputEncoding: null
The encoding
of an otherPublicKey
string.
optional
Jump to headingoutputEncoding: null
The encoding
of the return value.
Return Type Jump to heading
Buffer
Jump to headingDiffieHellman.prototype.computeSecret(): Buffer
Parameters Jump to heading
Jump to headingotherPublicKey: string
Jump to headinginputEncoding: BinaryToTextEncoding
optional
Jump to headingoutputEncoding: null
Return Type Jump to heading
Buffer
Jump to headingDiffieHellman.prototype.computeSecret(): string
Parameters Jump to heading
Jump to headingotherPublicKey: ArrayBufferView
Jump to headinginputEncoding: null
Jump to headingoutputEncoding: BinaryToTextEncoding
Return Type Jump to heading
string
Jump to headingDiffieHellman.prototype.computeSecret(): string
Parameters Jump to heading
Jump to headingotherPublicKey: string
Jump to headinginputEncoding: BinaryToTextEncoding
Jump to headingoutputEncoding: BinaryToTextEncoding
Return Type Jump to heading
string