sign
external fun sign(algorithm: String?, data: ERROR CLASS: Symbol not found for js.buffer.ArrayBufferView<*>, key: KeyLike): Buffer<*>(source)
external fun sign(algorithm: String?, data: ERROR CLASS: Symbol not found for js.buffer.ArrayBufferView<*>, key: SignKeyObjectInput): Buffer<*>(source)
external fun sign(algorithm: String?, data: ERROR CLASS: Symbol not found for js.buffer.ArrayBufferView<*>, key: SignPrivateKeyInput): Buffer<*>(source)
external fun sign(algorithm: String?, data: ERROR CLASS: Symbol not found for js.buffer.ArrayBufferView<*>, key: SignJsonWebKeyInput): Buffer<*>(source)
Calculates and returns the signature for data
using the given private key and algorithm. If algorithm
is null
or undefined
, then the algorithm is dependent upon the key type (especially Ed25519 and Ed448).
If key
is not a KeyObject
, this function behaves as if key
had been passed to {@link createPrivateKey}. If it is an object, the following additional properties can be passed:
If the callback
function is provided this function uses libuv's threadpool.
Since
v12.0.0
external fun sign(algorithm: String?, data: ERROR CLASS: Symbol not found for js.buffer.ArrayBufferView<*>, key: KeyLike, callback: (@R|kotlin/ParameterName|(name = String(error)) ERROR CLASS: Symbol not found for js.errors.JsError??, data: Buffer<*>) -> Unit)(source)
external fun sign(algorithm: String?, data: ERROR CLASS: Symbol not found for js.buffer.ArrayBufferView<*>, key: SignKeyObjectInput, callback: (@R|kotlin/ParameterName|(name = String(error)) ERROR CLASS: Symbol not found for js.errors.JsError??, data: Buffer<*>) -> Unit)(source)