We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8309130 commit 74c29c9Copy full SHA for 74c29c9
lib/internal/crypto/random.js
@@ -498,6 +498,12 @@ function generatePrimeSync(size, options = kEmptyObject) {
498
return job.result(prime);
499
}
500
501
+/**
502
+ * 48 is the ASCII code for '0', 97 is the ASCII code for 'a'.
503
+ * @param {number} number An integer between 0 and 15.
504
+ * @returns {number} corresponding to the ASCII code of the hex representation
505
+ * of the parameter.
506
+ */
507
const numberToHexCharCode = (number) => (number < 10 ? 48 : 87) + number;
508
509
/**
0 commit comments