阿西河

所有教程

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

我的收藏

    最近访问  (文章)

      教程列表

      抓包专区
      测试专区

      Node.js crypto.privateDecrypt

      Node.js crypto.privateDecrypt(privateKey, buffer)

      新增于: v0.11.14

      • privateKey < Object> | < string>
        • key < string> A PEM encoded private key.
        • passphrase < string> An optional passphrase for the private key.
        • padding <crypto.constants> An optional padding value defined in crypto.constants, which may be: crypto.constants.RSA_NO_PADDING, crypto.constants.RSA_PKCS1_PADDING, or crypto.constants.RSA_PKCS1_OAEP_PADDING.
      • buffer < Buffer> ||
      • Returns: < Buffer> A new Buffer with the decrypted content.

      Decrypts buffer with privateKey. buffer was previously encrypted using the corresponding public key, for example using crypto.publicEncrypt().

      privateKey can be an object or a string. If privateKey is a string, it is treated as the key with no passphrase and will use RSA_PKCS1_OAEP_PADDING.


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


      目录
      本文目录
      目录