crypto.privateDecrypt()

crypto.privateDecrypt(private_key, buffer)

Decrypts buffer with private_key.

private_key can be an object or a string. If private_key is a string, it is treated as the key with no passphrase and will use RSA_PKCS1_OAEP_PADDING. If private_key is an object, it is interpreted as a hash object with the keys:

  • key : {String} - PEM encoded private key
  • passphrase : {String} - Optional passphrase for the private key
  • padding : An optional padding value, one of the following:
    • constants.RSA_NO_PADDING
    • constants.RSA_PKCS1_PADDING
    • constants.RSA_PKCS1_OAEP_PADDING

All paddings are defined in the constants module.

doc_Nodejs
2016-04-30 04:38:32
Comments
Leave a Comment

Please login to continue.