Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Nov 22, 2022
1 parent 8309130 commit 74c29c9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/internal/crypto/random.js
Expand Up @@ -498,6 +498,12 @@ function generatePrimeSync(size, options = kEmptyObject) {
return job.result(prime);
}

/**
* 48 is the ASCII code for '0', 97 is the ASCII code for 'a'.
* @param {number} number An integer between 0 and 15.
* @returns {number} corresponding to the ASCII code of the hex representation
* of the parameter.
*/
const numberToHexCharCode = (number) => (number < 10 ? 48 : 87) + number;

/**
Expand Down

0 comments on commit 74c29c9

Please sign in to comment.