Skip to content

Commit 74c29c9

Browse files
authored
Add comment
1 parent 8309130 commit 74c29c9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/internal/crypto/random.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,12 @@ function generatePrimeSync(size, options = kEmptyObject) {
498498
return job.result(prime);
499499
}
500500

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+
*/
501507
const numberToHexCharCode = (number) => (number < 10 ? 48 : 87) + number;
502508

503509
/**

0 commit comments

Comments
 (0)