MCPcopy Create free account
hub / github.com/nodejs/node / getEffectiveSaltLength

Function getEffectiveSaltLength

test/parallel/test-crypto-sign-verify.js:164–173  ·  view source on GitHub ↗
(saltLength)

Source from the content-addressed store, hash-verified

162 const max = keySize / 8 - hLen - 2;
163
164 function getEffectiveSaltLength(saltLength) {
165 switch (saltLength) {
166 case crypto.constants.RSA_PSS_SALTLEN_DIGEST:
167 return hLen;
168 case crypto.constants.RSA_PSS_SALTLEN_MAX_SIGN:
169 return max;
170 default:
171 return saltLength;
172 }
173 }
174
175 const signSaltLengths = [
176 crypto.constants.RSA_PSS_SALTLEN_DIGEST,

Callers 1

testPSSFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected