crypto模块的方法和属性


crypto.constants

crypto.DEFAULT_ENCODING

crypto.fips

crypto.createCipher(algorithm, password[, options])

crypto.createCipheriv(algorithm, key, iv[, options])

crypto.createDecipher(algorithm, password[, options])

crypto.createDecipheriv(algorithm, key, iv[, options])

crypto.createDiffieHellman(prime[, primeEncoding][, generator][, generatorEncoding])

crypto.createDiffieHellman(primeLength[, generator])

crypto.createECDH(curveName)

crypto.createHash(algorithm[, options])

crypto.createHmac(algorithm, key[, options])

crypto.createPrivateKey(key)

crypto.createPublicKey(key)

crypto.createSecretKey(key)

crypto.createSign(algorithm[, options])

crypto.createVerify(algorithm[, options])

crypto.diffieHellman(options)

crypto.generateKeyPair(type, options, callback)

crypto.generateKeyPairSync(type, options)

crypto.getCiphers()

crypto.getCurves()

crypto.getDiffieHellman(groupName

crypto.getFips()

crypto.getHashes()

crypto.pbkdf2(password, salt, iterations, keylen, digest, callback)

crypto.pbkdf2Sync(password, salt, iterations, keylen, digest)

crypto.privateDecrypt(privateKey, buffer)

crypto.privateEncrypt(privateKey, buffer)

crypto.publicDecrypt(key, buffer)

crypto.publicEncrypt(key, buffer)

使用key加密buffer的的内容并返回一个新的带加密的内容Buffer

crypto.randomBytes(size[, callback])

crypto.randomFillSync(buffer[, offset][, size])

crypto.randomFill(buffer[, offset][, size], callback)

crypto.scrypt(password, salt, keylen[, options], callback)

crypto.scryptSync(password, salt, keylen[, options])

crypto.setEngine(engine[, flags])

crypto.setFips(bool)

crypto.sign(algorithm, data, key)

crypto.timingSafeEqual(a, b)

crypto.verify(algorithm, data, key, signature)


最后修改 April 16, 2020: 加密 (a75e592)