Skip to content
rzcoder edited this page Apr 11, 2017 · 4 revisions

Advanced options:
You also can specify advanced options for some schemes like this:

options = {
  encryptionScheme: {
    scheme: 'pkcs1_oaep', //scheme
    hash: 'md5', //hash using for scheme
    mgf: function(...) {...} //mask generation function
  },
  signingScheme: {
    scheme: 'pss', //scheme
    hash: 'sha1', //hash using for scheme
    saltLength: 20 //salt length for pss sign
  }
}
options = {
  encryptionScheme: {
    scheme:'pkcs1',
    padding: constants.RSA_NO_PADDING
  }
}

NOTICE: encryptionScheme.hash, encryptionScheme.mfg and signingScheme.saltLength don't work in node environment

Clone this wiki locally