阿西河

所有教程

公众号
🌙
阿西河前端的公众号

我的收藏

    最近访问  (文章)

      教程列表

      抓包专区
      测试专区

      Node.js crypto.createDiffieHellman

      Node.js crypto.createDiffieHellman(prime[, primeEncoding][, generator][, generatorEncoding])版本历史

      版本变更
      v8.0.0The prime argument can be any TypedArray or DataView now.
      v8.0.0The prime argument can be a Uint8Array now.
      v6.0.0The default for the encoding parameters changed from binary to utf8.
      v0.11.12新增于: v0.11.12
      • prime < string> | < Buffer> ||
      • primeEncoding < string> The encoding of the prime string.
      • generator < number> | < string> | < Buffer> ||Default: 2
      • generatorEncoding < string> The encoding of the generator string.
      • Returns:

      Creates a DiffieHellman key exchange object using the supplied prime and an optional specific generator.

      The generator argument can be a number, string, or Buffer. If generator is not specified, the value 2 is used.

      If primeEncoding is specified, prime is expected to be a string; otherwise a Buffer, TypedArray, or DataView is expected.

      If generatorEncoding is specified, generator is expected to be a string; otherwise a number, Buffer, TypedArray, or DataView is expected.

      crypto.createDiffieHellman(primeLength[, generator])

      新增于: v0.5.0

      • primeLength < number>
      • generator < number> | < string> | < Buffer> ||Default: 2
      • Returns:

      Creates a DiffieHellman key exchange object and generates a prime of primeLength bits using an optional specific numeric generator. If generator is not specified, the value 2 is used.


      更多内容请参考:Node.js crypto 加密,或者通过 点击对应菜单 进行查看;


      目录
      目录