(length = 4, rand = random)
| 32 | const random = createRandom(); |
| 33 | |
| 34 | const createEntropy = (length = 4, rand = random) => { |
| 35 | let entropy = ""; |
| 36 | |
| 37 | while (entropy.length < length) { |
| 38 | entropy = entropy + Math.floor(rand() * 36).toString(36); |
| 39 | } |
| 40 | return entropy; |
| 41 | }; |
| 42 | |
| 43 | /* |
| 44 | * Adapted from https://github.com/juanelas/bigint-conversion |
no outgoing calls
no test coverage detected
searching dependent graphs…