nodeCryptoMod

class Object
trait Matchable
class Any

Type members

Classlikes

object Certificate
@JSImport("node:crypto", "Certificate") @native @JSType
class CertificateCls() extends StObject with Certificate
@JSImport("node:crypto", "Cipher") @native @JSType
class Cipher extends StObject
@JSImport("node:crypto", "Decipher") @native @JSType
class Decipher extends StObject
@JSImport("node:crypto", "DiffieHellman") @native @JSType
@JSImport("node:crypto", "ECDH") @native @JSType
class ECDH extends ECDH
Companion
object
object ECDH
Companion
class
@JSImport("node:crypto", "Hash") @native @JSType
class Hash extends StObject
@JSImport("node:crypto", "Hmac") @native @JSType
class Hmac extends StObject
@JSImport("node:crypto", "KeyObject") @native @JSType
class KeyObject extends KeyObject
@JSImport("node:crypto", "Signer") @native @JSType
class Signer extends StObject
@JSImport("node:crypto", "Verify") @native @JSType
class Verify_ extends StObject
@JSImport("node:crypto", "X509Certificate") @native @JSType
object constants

Value members

Concrete methods

@inline
def checkPrime(value: LargeNumberLike, callback: Function2[Error | Null, Boolean, Unit]): Unit

Checks the primality of the candidate.

Checks the primality of the candidate.

@inline
def checkPrime(value: LargeNumberLike, options: CheckPrimeOptions, callback: Function2[Error | Null, Boolean, Unit]): Unit
@inline
def checkPrimeSync(value: LargeNumberLike): Boolean

Checks the primality of the candidate.

Checks the primality of the candidate.

@inline
def checkPrimeSync(value: LargeNumberLike, options: CheckPrimeOptions): Boolean
@inline
def createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM
@inline
def createCipher(algorithm: CipherGCMTypes, password: BinaryLike): CipherGCM
@inline
def createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options: CipherGCMOptions): CipherGCM
@inline
def createCipher(algorithm: String, password: BinaryLike): Cipher
@inline
def createCipher(algorithm: String, password: BinaryLike, options: TransformOptions): Cipher
@inline
@inline
def createCipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: Null, options: CipherCCMOptions): CipherCCM
@inline
@inline
@inline
@inline
def createCipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: Null, options: CipherGCMOptions): CipherGCM
@inline
def createCipheriv(algorithm: String, key: CipherKey): Cipher
@inline
def createCipheriv(algorithm: String, key: CipherKey, iv: BinaryLike): Cipher
@inline
def createCipheriv(algorithm: String, key: CipherKey, iv: BinaryLike, options: TransformOptions): Cipher
@inline
def createCipheriv(algorithm: String, key: CipherKey, iv: Null, options: TransformOptions): Cipher
@inline
@inline
@inline
@inline
def createDecipher(algorithm: String, password: BinaryLike): Decipher
@inline
def createDecipher(algorithm: String, password: BinaryLike, options: TransformOptions): Decipher
@inline
@inline
def createDecipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: Null, options: CipherCCMOptions): DecipherCCM
@inline
@inline
@inline
@inline
def createDecipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: Null, options: CipherGCMOptions): DecipherGCM
@inline
def createDecipheriv(algorithm: String, key: CipherKey): Decipher
@inline
def createDecipheriv(algorithm: String, key: CipherKey, iv: BinaryLike): Decipher
@inline
def createDecipheriv(algorithm: String, key: CipherKey, iv: BinaryLike, options: TransformOptions): Decipher
@inline
def createDecipheriv(algorithm: String, key: CipherKey, iv: Null, options: TransformOptions): Decipher
@inline
def createDiffieHellman(prime_length: Double): DiffieHellman_
@inline
def createDiffieHellman(prime_length: Double, generator: ArrayBufferView): DiffieHellman_
@inline
def createDiffieHellman(prime_length: Double, generator: Double): DiffieHellman_
@inline
def createDiffieHellman(prime: String, prime_encoding: BinaryToTextEncoding): DiffieHellman_
@inline
def createDiffieHellman(prime: String, prime_encoding: BinaryToTextEncoding, generator: ArrayBufferView): DiffieHellman_
@inline
def createDiffieHellman(prime: String, prime_encoding: BinaryToTextEncoding, generator: String, generator_encoding: BinaryToTextEncoding): DiffieHellman_
@inline
def createDiffieHellman(prime: String, prime_encoding: BinaryToTextEncoding, generator: Double): DiffieHellman_
@inline
def createECDH(curve_name: String): ECDH
@inline
def createHash(algorithm: String): Hash
@inline
def createHash(algorithm: String, options: HashOptions): Hash
@inline
def createHmac(algorithm: String, key: BinaryLike): Hmac
@inline
def createHmac(algorithm: String, key: BinaryLike, options: TransformOptions): Hmac
@inline
def createHmac(algorithm: String, key: KeyObject): Hmac
@inline
def createHmac(algorithm: String, key: KeyObject, options: TransformOptions): Hmac
@inline
@inline
def createPrivateKey(key: String): KeyObject
@inline
@inline
def createPublicKey(key: String): KeyObject
@inline
def createSign(algorithm: String): Signer
@inline
def createSign(algorithm: String, options: WritableOptions): Signer
@inline
def createVerify(algorithm: String): Verify_
@inline
def createVerify(algorithm: String, options: WritableOptions): Verify_
@inline

Computes the Diffie-Hellman secret based on a privateKey and a publicKey. Both keys must have the same asymmetricKeyType, which must be one of 'dh' (for Diffie-Hellman), 'ec' (for ECDH), 'x448', or 'x25519' (for ECDH-ES).

Computes the Diffie-Hellman secret based on a privateKey and a publicKey. Both keys must have the same asymmetricKeyType, which must be one of 'dh' (for Diffie-Hellman), 'ec' (for ECDH), 'x448', or 'x25519' (for ECDH-ES).

@inline
def generateKeyPair(`type`: dsa, options: DSAKeyPairKeyObjectOptions, callback: Function3[Error | Null, KeyObject, KeyObject, Unit]): Unit
@inline
def generateKeyPair(`type`: dsa, options: DSAKeyPairOptions[der | pem, der | pem], callback: Function3[Error | Null, Buffer | String, Buffer | String, Unit]): Unit
@inline
def generateKeyPair(`type`: ec, options: ECKeyPairKeyObjectOptions, callback: Function3[Error | Null, KeyObject, KeyObject, Unit]): Unit
@inline
def generateKeyPair(`type`: ec, options: ECKeyPairOptions[der | pem, der | pem], callback: Function3[Error | Null, Buffer | String, Buffer | String, Unit]): Unit
@inline
def generateKeyPair(`type`: ed25519, options: ED25519KeyPairKeyObjectOptions, callback: Function3[Error | Null, KeyObject, KeyObject, Unit]): Unit
@inline
def generateKeyPair(`type`: ed25519, options: ED25519KeyPairOptions[der | pem, der | pem], callback: Function3[Error | Null, Buffer | String, Buffer | String, Unit]): Unit
@inline
def generateKeyPair(`type`: ed25519, options: Unit, callback: Function3[Error | Null, KeyObject, KeyObject, Unit]): Unit
@inline
def generateKeyPair(`type`: ed448, options: ED448KeyPairKeyObjectOptions, callback: Function3[Error | Null, KeyObject, KeyObject, Unit]): Unit
@inline
def generateKeyPair(`type`: ed448, options: ED448KeyPairOptions[der | pem, der | pem], callback: Function3[Error | Null, Buffer | String, Buffer | String, Unit]): Unit
@inline
def generateKeyPair(`type`: ed448, options: Unit, callback: Function3[Error | Null, KeyObject, KeyObject, Unit]): Unit
@inline
def generateKeyPair(`type`: rsa, options: RSAKeyPairKeyObjectOptions, callback: Function3[Error | Null, KeyObject, KeyObject, Unit]): Unit
@inline
def generateKeyPair(`type`: rsa, options: RSAKeyPairOptions[der | pem, der | pem], callback: Function3[Error | Null, Buffer | String, Buffer | String, Unit]): Unit
@inline
def generateKeyPair(`type`: x25519, options: X25519KeyPairKeyObjectOptions, callback: Function3[Error | Null, KeyObject, KeyObject, Unit]): Unit
@inline
def generateKeyPair(`type`: x25519, options: X25519KeyPairOptions[der | pem, der | pem], callback: Function3[Error | Null, Buffer | String, Buffer | String, Unit]): Unit
@inline
def generateKeyPair(`type`: x25519, options: Unit, callback: Function3[Error | Null, KeyObject, KeyObject, Unit]): Unit
@inline
def generateKeyPair(`type`: x448, options: X448KeyPairKeyObjectOptions, callback: Function3[Error | Null, KeyObject, KeyObject, Unit]): Unit
@inline
def generateKeyPair(`type`: x448, options: X448KeyPairOptions[der | pem, der | pem], callback: Function3[Error | Null, Buffer | String, Buffer | String, Unit]): Unit
@inline
def generateKeyPair(`type`: x448, options: Unit, callback: Function3[Error | Null, KeyObject, KeyObject, Unit]): Unit
@inline
def generateKeyPairSync(`type`: dsa, options: DSAKeyPairOptions[der | pem, der | pem]): KeyPairSyncResult[String, String]
@inline
def generateKeyPairSync(`type`: ec, options: ECKeyPairOptions[der | pem, der | pem]): KeyPairSyncResult[String, String]
@inline
def generateKeyPairSync(`type`: ed25519, options: ED25519KeyPairOptions[der | pem, der | pem]): KeyPairSyncResult[String, String]
@inline
def generateKeyPairSync(`type`: ed448, options: ED448KeyPairOptions[der | pem, der | pem]): KeyPairSyncResult[String, String]
@inline
def generateKeyPairSync(`type`: rsa, options: RSAKeyPairOptions[der | pem, der | pem]): KeyPairSyncResult[String, String]
@inline
def generateKeyPairSync(`type`: x25519, options: X25519KeyPairOptions[der | pem, der | pem]): KeyPairSyncResult[String, String]
@inline
def generateKeyPairSync(`type`: x448, options: X448KeyPairOptions[der | pem, der | pem]): KeyPairSyncResult[String, String]
@inline
def generateKey_aes(`type`: aes, options: Length, callback: Function2[Error | Null, KeyObject, Unit]): Unit
@inline
def generateKey_hmac(`type`: hmac, options: Length, callback: Function2[Error | Null, KeyObject, Unit]): Unit
@inline
def generatePrime(size: Double, callback: Function2[Error | Null, ArrayBuffer, Unit]): Unit
@inline
def generatePrime(size: Double, options: GeneratePrimeOptionsArrayBuffer, callback: Function2[Error | Null, ArrayBuffer, Unit]): Unit
@inline
def generatePrime(size: Double, options: GeneratePrimeOptionsBigInt, callback: Function2[Error | Null, BigInt, Unit]): Unit
@inline
def generatePrime(size: Double, options: GeneratePrimeOptions, callback: Function2[Error | Null, ArrayBuffer | BigInt, Unit]): Unit
@inline
def generatePrimeSync(size: Double): ArrayBuffer
@inline
def generatePrimeSync(size: Double, options: GeneratePrimeOptions): ArrayBuffer | BigInt
@inline
def generatePrimeSync(size: Double, options: GeneratePrimeOptionsArrayBuffer): ArrayBuffer
@inline
def generatePrimeSync(size: Double, options: GeneratePrimeOptionsBigInt): BigInt
@inline
def getCipherInfo(nameOrNid: String): UndefOr[CipherInfo]

Returns information about a given cipher.

Returns information about a given cipher.

Some ciphers accept variable length keys and initialization vectors. By default, the crypto.getCipherInfo() method will return the default values for these ciphers. To test if a given key length or iv length is acceptable for given cipher, use the keyLenth and ivLenth options. If the given values are unacceptable, undefined will be returned.

Value Params
nameOrNid

The name or nid of the cipher to query.

@inline
def getCipherInfo(nameOrNid: String, options: CipherInfoOptions): UndefOr[CipherInfo]
@inline
def getCipherInfo(nameOrNid: Double): UndefOr[CipherInfo]
@inline
def getCipherInfo(nameOrNid: Double, options: CipherInfoOptions): UndefOr[CipherInfo]
@inline
def getCiphers(): Array[String]
@inline
def getCurves(): Array[String]
@inline
def getDiffieHellman(group_name: String): DiffieHellman_
@inline
def getFips(): 1 | 0
@inline
def getHashes(): Array[String]
@inline
def hkdf(digest: String, key: BinaryLike, salt: BinaryLike, info: BinaryLike, keylen: Double, callback: Function2[Error | Null, ArrayBuffer, Unit]): Unit

HKDF is a simple key derivation function defined in RFC 5869. The given key, salt and info are used with the digest to derive a key of keylen bytes.

HKDF is a simple key derivation function defined in RFC 5869. The given key, salt and info are used with the digest to derive a key of keylen bytes.

The supplied callback function is called with two arguments: err and derivedKey. If an errors occurs while deriving the key, err will be set; otherwise err will be null. The successfully generated derivedKey will be passed to the callback as an ArrayBuffer. An error will be thrown if any of the input aguments specify invalid values or types.

@inline
def hkdf(digest: String, key: KeyObject, salt: BinaryLike, info: BinaryLike, keylen: Double, callback: Function2[Error | Null, ArrayBuffer, Unit]): Unit
@inline
def hkdfSync(digest: String, key: BinaryLike, salt: BinaryLike, info: BinaryLike, keylen: Double): ArrayBuffer

Provides a synchronous HKDF key derivation function as defined in RFC 5869. The given key, salt and info are used with the digest to derive a key of keylen bytes.

Provides a synchronous HKDF key derivation function as defined in RFC 5869. The given key, salt and info are used with the digest to derive a key of keylen bytes.

The successfully generated derivedKey will be returned as an ArrayBuffer. An error will be thrown if any of the input aguments specify invalid values or types, or if the derived key cannot be generated.

@inline
def hkdfSync(digest: String, key: KeyObject, salt: BinaryLike, info: BinaryLike, keylen: Double): ArrayBuffer
@inline
def pbkdf2(password: BinaryLike, salt: BinaryLike, iterations: Double, keylen: Double, digest: String, callback: Function2[Error | Null, Buffer, Unit]): Unit
@inline
def pbkdf2Sync(password: BinaryLike, salt: BinaryLike, iterations: Double, keylen: Double, digest: String): Buffer
@inline
def privateDecrypt(private_key: KeyLike, buffer: ArrayBufferView): Buffer
@inline
def privateDecrypt(private_key: RsaPrivateKey, buffer: ArrayBufferView): Buffer
@inline
def privateEncrypt(private_key: KeyLike, buffer: ArrayBufferView): Buffer
@inline
def privateEncrypt(private_key: RsaPrivateKey, buffer: ArrayBufferView): Buffer
@inline
def pseudoRandomBytes(size: Double): Buffer
@inline
def pseudoRandomBytes(size: Double, callback: Function2[Error | Null, Buffer, Unit]): Unit
@inline
@inline
@inline
@inline
@inline
def randomBytes(size: Double): Buffer
@inline
def randomBytes(size: Double, callback: Function2[Error | Null, Buffer, Unit]): Unit
@inline
def randomFill(buffer: BigInt64Array, callback: Function2[Error | Null, BigInt64Array, Unit]): Unit
@inline
def randomFill(buffer: BigInt64Array, offset: Double, callback: Function2[Error | Null, BigInt64Array, Unit]): Unit
@inline
def randomFill(buffer: BigInt64Array, offset: Double, size: Double, callback: Function2[Error | Null, BigInt64Array, Unit]): Unit
@inline
def randomFill(buffer: BigUint64Array, callback: Function2[Error | Null, BigUint64Array, Unit]): Unit
@inline
def randomFill(buffer: BigUint64Array, offset: Double, callback: Function2[Error | Null, BigUint64Array, Unit]): Unit
@inline
def randomFill(buffer: BigUint64Array, offset: Double, size: Double, callback: Function2[Error | Null, BigUint64Array, Unit]): Unit
@inline
def randomFill(buffer: DataView, callback: Function2[Error | Null, DataView, Unit]): Unit
@inline
def randomFill(buffer: DataView, offset: Double, callback: Function2[Error | Null, DataView, Unit]): Unit
@inline
def randomFill(buffer: DataView, offset: Double, size: Double, callback: Function2[Error | Null, DataView, Unit]): Unit
@inline
def randomFill(buffer: Float32Array, callback: Function2[Error | Null, Float32Array, Unit]): Unit
@inline
def randomFill(buffer: Float32Array, offset: Double, callback: Function2[Error | Null, Float32Array, Unit]): Unit
@inline
def randomFill(buffer: Float32Array, offset: Double, size: Double, callback: Function2[Error | Null, Float32Array, Unit]): Unit
@inline
def randomFill(buffer: Float64Array, callback: Function2[Error | Null, Float64Array, Unit]): Unit
@inline
def randomFill(buffer: Float64Array, offset: Double, callback: Function2[Error | Null, Float64Array, Unit]): Unit
@inline
def randomFill(buffer: Float64Array, offset: Double, size: Double, callback: Function2[Error | Null, Float64Array, Unit]): Unit
@inline
def randomFill(buffer: Int16Array, callback: Function2[Error | Null, Int16Array, Unit]): Unit
@inline
def randomFill(buffer: Int16Array, offset: Double, callback: Function2[Error | Null, Int16Array, Unit]): Unit
@inline
def randomFill(buffer: Int16Array, offset: Double, size: Double, callback: Function2[Error | Null, Int16Array, Unit]): Unit
@inline
def randomFill(buffer: Int32Array, callback: Function2[Error | Null, Int32Array, Unit]): Unit
@inline
def randomFill(buffer: Int32Array, offset: Double, callback: Function2[Error | Null, Int32Array, Unit]): Unit
@inline
def randomFill(buffer: Int32Array, offset: Double, size: Double, callback: Function2[Error | Null, Int32Array, Unit]): Unit
@inline
def randomFill(buffer: Int8Array, callback: Function2[Error | Null, Int8Array, Unit]): Unit
@inline
def randomFill(buffer: Int8Array, offset: Double, callback: Function2[Error | Null, Int8Array, Unit]): Unit
@inline
def randomFill(buffer: Int8Array, offset: Double, size: Double, callback: Function2[Error | Null, Int8Array, Unit]): Unit
@inline
def randomFill(buffer: Uint16Array, callback: Function2[Error | Null, Uint16Array, Unit]): Unit
@inline
def randomFill(buffer: Uint16Array, offset: Double, callback: Function2[Error | Null, Uint16Array, Unit]): Unit
@inline
def randomFill(buffer: Uint16Array, offset: Double, size: Double, callback: Function2[Error | Null, Uint16Array, Unit]): Unit
@inline
def randomFill(buffer: Uint32Array, callback: Function2[Error | Null, Uint32Array, Unit]): Unit
@inline
def randomFill(buffer: Uint32Array, offset: Double, callback: Function2[Error | Null, Uint32Array, Unit]): Unit
@inline
def randomFill(buffer: Uint32Array, offset: Double, size: Double, callback: Function2[Error | Null, Uint32Array, Unit]): Unit
@inline
def randomFill(buffer: Uint8Array, callback: Function2[Error | Null, Uint8Array, Unit]): Unit
@inline
def randomFill(buffer: Uint8Array, offset: Double, callback: Function2[Error | Null, Uint8Array, Unit]): Unit
@inline
def randomFill(buffer: Uint8Array, offset: Double, size: Double, callback: Function2[Error | Null, Uint8Array, Unit]): Unit
@inline
def randomFill(buffer: Uint8ClampedArray, callback: Function2[Error | Null, Uint8ClampedArray, Unit]): Unit
@inline
def randomFill(buffer: Uint8ClampedArray, offset: Double, callback: Function2[Error | Null, Uint8ClampedArray, Unit]): Unit
@inline
def randomFill(buffer: Uint8ClampedArray, offset: Double, size: Double, callback: Function2[Error | Null, Uint8ClampedArray, Unit]): Unit
@inline
def randomFillSync(buffer: BigInt64Array, offset: Double): BigInt64Array
@inline
def randomFillSync(buffer: BigInt64Array, offset: Double, size: Double): BigInt64Array
@inline
def randomFillSync(buffer: BigInt64Array, offset: Unit, size: Double): BigInt64Array
@inline
def randomFillSync(buffer: BigUint64Array, offset: Double): BigUint64Array
@inline
def randomFillSync(buffer: BigUint64Array, offset: Double, size: Double): BigUint64Array
@inline
def randomFillSync(buffer: BigUint64Array, offset: Unit, size: Double): BigUint64Array
@inline
def randomFillSync(buffer: DataView): DataView
@inline
def randomFillSync(buffer: DataView, offset: Double): DataView
@inline
def randomFillSync(buffer: DataView, offset: Double, size: Double): DataView
@inline
def randomFillSync(buffer: DataView, offset: Unit, size: Double): DataView
@inline
def randomFillSync(buffer: Float32Array): Float32Array
@inline
def randomFillSync(buffer: Float32Array, offset: Double): Float32Array
@inline
def randomFillSync(buffer: Float32Array, offset: Double, size: Double): Float32Array
@inline
def randomFillSync(buffer: Float32Array, offset: Unit, size: Double): Float32Array
@inline
def randomFillSync(buffer: Float64Array): Float64Array
@inline
def randomFillSync(buffer: Float64Array, offset: Double): Float64Array
@inline
def randomFillSync(buffer: Float64Array, offset: Double, size: Double): Float64Array
@inline
def randomFillSync(buffer: Float64Array, offset: Unit, size: Double): Float64Array
@inline
def randomFillSync(buffer: Int16Array): Int16Array
@inline
def randomFillSync(buffer: Int16Array, offset: Double): Int16Array
@inline
def randomFillSync(buffer: Int16Array, offset: Double, size: Double): Int16Array
@inline
def randomFillSync(buffer: Int16Array, offset: Unit, size: Double): Int16Array
@inline
def randomFillSync(buffer: Int32Array): Int32Array
@inline
def randomFillSync(buffer: Int32Array, offset: Double): Int32Array
@inline
def randomFillSync(buffer: Int32Array, offset: Double, size: Double): Int32Array
@inline
def randomFillSync(buffer: Int32Array, offset: Unit, size: Double): Int32Array
@inline
def randomFillSync(buffer: Int8Array): Int8Array
@inline
def randomFillSync(buffer: Int8Array, offset: Double): Int8Array
@inline
def randomFillSync(buffer: Int8Array, offset: Double, size: Double): Int8Array
@inline
def randomFillSync(buffer: Int8Array, offset: Unit, size: Double): Int8Array
@inline
def randomFillSync(buffer: Uint16Array): Uint16Array
@inline
def randomFillSync(buffer: Uint16Array, offset: Double): Uint16Array
@inline
def randomFillSync(buffer: Uint16Array, offset: Double, size: Double): Uint16Array
@inline
def randomFillSync(buffer: Uint16Array, offset: Unit, size: Double): Uint16Array
@inline
def randomFillSync(buffer: Uint32Array): Uint32Array
@inline
def randomFillSync(buffer: Uint32Array, offset: Double): Uint32Array
@inline
def randomFillSync(buffer: Uint32Array, offset: Double, size: Double): Uint32Array
@inline
def randomFillSync(buffer: Uint32Array, offset: Unit, size: Double): Uint32Array
@inline
def randomFillSync(buffer: Uint8Array): Uint8Array
@inline
def randomFillSync(buffer: Uint8Array, offset: Double): Uint8Array
@inline
def randomFillSync(buffer: Uint8Array, offset: Double, size: Double): Uint8Array
@inline
def randomFillSync(buffer: Uint8Array, offset: Unit, size: Double): Uint8Array
@inline
def randomFillSync(buffer: Uint8ClampedArray): Uint8ClampedArray
@inline
def randomFillSync(buffer: Uint8ClampedArray, offset: Double): Uint8ClampedArray
@inline
def randomFillSync(buffer: Uint8ClampedArray, offset: Double, size: Double): Uint8ClampedArray
@inline
def randomFillSync(buffer: Uint8ClampedArray, offset: Unit, size: Double): Uint8ClampedArray
@inline
def randomInt(max: Double): Double
@inline
def randomInt(max: Double, callback: Function2[Error | Null, Double, Unit]): Unit
@inline
def randomInt(min: Double, max: Double): Double
@inline
def randomInt(min: Double, max: Double, callback: Function2[Error | Null, Double, Unit]): Unit
@inline
def randomUUID(): String
@inline
def randomUUID(options: RandomUUIDOptions): String
@inline
def scrypt(password: BinaryLike, salt: BinaryLike, keylen: Double, callback: Function2[Error | Null, Buffer, Unit]): Unit
@inline
def scrypt(password: BinaryLike, salt: BinaryLike, keylen: Double, options: ScryptOptions, callback: Function2[Error | Null, Buffer, Unit]): Unit
@inline
def scryptSync(password: BinaryLike, salt: BinaryLike, keylen: Double): Buffer
@inline
def scryptSync(password: BinaryLike, salt: BinaryLike, keylen: Double, options: ScryptOptions): Buffer
@inline
def sign(algorithm: String, data: ArrayBufferView, key: KeyLike): Buffer

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).

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 `crypto.createPrivateKey().

@inline
def sign(algorithm: String, data: ArrayBufferView, key: KeyLike, callback: Function2[Error | Null, Buffer, Unit]): Unit
@inline
def sign(algorithm: String, data: ArrayBufferView, key: SignKeyObjectInput): Buffer
@inline
def sign(algorithm: String, data: ArrayBufferView, key: SignKeyObjectInput, callback: Function2[Error | Null, Buffer, Unit]): Unit
@inline
def sign(algorithm: String, data: ArrayBufferView, key: SignPrivateKeyInput): Buffer
@inline
def sign(algorithm: String, data: ArrayBufferView, key: SignPrivateKeyInput, callback: Function2[Error | Null, Buffer, Unit]): Unit
@inline
def sign(algorithm: Null, data: ArrayBufferView, key: KeyLike): Buffer
@inline
def sign(algorithm: Null, data: ArrayBufferView, key: KeyLike, callback: Function2[Error | Null, Buffer, Unit]): Unit
@inline
def sign(algorithm: Null, data: ArrayBufferView, key: SignKeyObjectInput): Buffer
@inline
def sign(algorithm: Null, data: ArrayBufferView, key: SignKeyObjectInput, callback: Function2[Error | Null, Buffer, Unit]): Unit
@inline
def sign(algorithm: Null, data: ArrayBufferView, key: SignPrivateKeyInput): Buffer
@inline
def sign(algorithm: Null, data: ArrayBufferView, key: SignPrivateKeyInput, callback: Function2[Error | Null, Buffer, Unit]): Unit
@inline
def sign(algorithm: Unit, data: ArrayBufferView, key: KeyLike): Buffer
@inline
def sign(algorithm: Unit, data: ArrayBufferView, key: KeyLike, callback: Function2[Error | Null, Buffer, Unit]): Unit
@inline
def sign(algorithm: Unit, data: ArrayBufferView, key: SignKeyObjectInput): Buffer
@inline
def sign(algorithm: Unit, data: ArrayBufferView, key: SignKeyObjectInput, callback: Function2[Error | Null, Buffer, Unit]): Unit
@inline
def sign(algorithm: Unit, data: ArrayBufferView, key: SignPrivateKeyInput): Buffer
@inline
def sign(algorithm: Unit, data: ArrayBufferView, key: SignPrivateKeyInput, callback: Function2[Error | Null, Buffer, Unit]): Unit
@inline
@inline
def verify(algorithm: String, data: ArrayBufferView, key: KeyLike, signature: ArrayBufferView): Boolean

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).

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 crypto.createPublicKey().

@inline
def verify(algorithm: String, data: ArrayBufferView, key: KeyLike, signature: ArrayBufferView, callback: Function2[Error | Null, Boolean, Unit]): Unit
@inline
def verify(algorithm: String, data: ArrayBufferView, key: VerifyKeyObjectInput, signature: ArrayBufferView): Boolean
@inline
def verify(algorithm: String, data: ArrayBufferView, key: VerifyKeyObjectInput, signature: ArrayBufferView, callback: Function2[Error | Null, Boolean, Unit]): Unit
@inline
def verify(algorithm: String, data: ArrayBufferView, key: VerifyPublicKeyInput, signature: ArrayBufferView): Boolean
@inline
def verify(algorithm: String, data: ArrayBufferView, key: VerifyPublicKeyInput, signature: ArrayBufferView, callback: Function2[Error | Null, Boolean, Unit]): Unit
@inline
def verify(algorithm: Null, data: ArrayBufferView, key: KeyLike, signature: ArrayBufferView): Boolean
@inline
def verify(algorithm: Null, data: ArrayBufferView, key: KeyLike, signature: ArrayBufferView, callback: Function2[Error | Null, Boolean, Unit]): Unit
@inline
def verify(algorithm: Null, data: ArrayBufferView, key: VerifyKeyObjectInput, signature: ArrayBufferView): Boolean
@inline
def verify(algorithm: Null, data: ArrayBufferView, key: VerifyKeyObjectInput, signature: ArrayBufferView, callback: Function2[Error | Null, Boolean, Unit]): Unit
@inline
def verify(algorithm: Null, data: ArrayBufferView, key: VerifyPublicKeyInput, signature: ArrayBufferView): Boolean
@inline
def verify(algorithm: Null, data: ArrayBufferView, key: VerifyPublicKeyInput, signature: ArrayBufferView, callback: Function2[Error | Null, Boolean, Unit]): Unit
@inline
def verify(algorithm: Unit, data: ArrayBufferView, key: KeyLike, signature: ArrayBufferView): Boolean
@inline
def verify(algorithm: Unit, data: ArrayBufferView, key: KeyLike, signature: ArrayBufferView, callback: Function2[Error | Null, Boolean, Unit]): Unit
@inline
def verify(algorithm: Unit, data: ArrayBufferView, key: VerifyKeyObjectInput, signature: ArrayBufferView): Boolean
@inline
def verify(algorithm: Unit, data: ArrayBufferView, key: VerifyKeyObjectInput, signature: ArrayBufferView, callback: Function2[Error | Null, Boolean, Unit]): Unit
@inline
def verify(algorithm: Unit, data: ArrayBufferView, key: VerifyPublicKeyInput, signature: ArrayBufferView): Boolean
@inline
def verify(algorithm: Unit, data: ArrayBufferView, key: VerifyPublicKeyInput, signature: ArrayBufferView, callback: Function2[Error | Null, Boolean, Unit]): Unit

Concrete fields

@JSImport("node:crypto", "DEFAULT_ENCODING") @native
@JSImport("node:crypto") @native
val ^: Any
@JSImport("node:crypto", "fips") @native
val fips: Boolean