Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c45de33

Browse files
committed
Fix README internal links
1 parent 37d45f7 commit c45de33

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ Efficiently generate cryptographically strong random strings of specified entrop
1212
- [More Examples](#MoreExamples)
1313
- [Character Sets](#CharacterSets)
1414
- [Custom Characters](#CustomCharacters)
15-
- [Unique Characters](#UniqueCharacters)
1615
- [Efficiency](#Efficiency)
1716
- [Custom Bytes](#CustomBytes)
18-
- [TL;DR Take 2](#TLDR2)
17+
- [TL;DR 2](#TLDR2)
1918

2019
## <a name="Installation"></a>Installation
2120

@@ -102,7 +101,7 @@ A common strategy is to replace the *guarantee of uniqueness* with a weaker but
102101

103102
Understanding probabilistic uniqueness requires some understanding of [*entropy*](https://en.wikipedia.org/wiki/Entropy_(information_theory)) and of estimating the probability of a [*collision*](https://en.wikipedia.org/wiki/Birthday_problem#Cast_as_a_collision_problem) (i.e., the probability that two strings in a set of randomly generated strings might be the same). Happily, you can use `entropy-string` without a deep understanding of these topics.
104103

105-
We'll begin investigating `entropy-string` by considering our [Real Need](Read%20Need) when generating random strings.
104+
We'll begin investigating `entropy-string` by considering our [Real Need](#Real%20Need) when generating random strings.
106105

107106
[TOC](#TOC)
108107

@@ -132,7 +131,7 @@ Ah, now we're getting somewhere. The answer to question 3 might lead to the furt
132131

133132
And the cat's out of the bag. We're getting at the real need, and it's not the same as the original statement. The developer needs *uniqueness* across a total of some number of strings. The length of the string is a by-product of the uniqueness, not the goal.
134133

135-
As noted in the [Overview](Overview), guaranteeing uniqueness is difficult, so we'll replace that declaration with one of *probabilistic uniqueness* by asking:
134+
As noted in the [Overview](#Overview), guaranteeing uniqueness is difficult, so we'll replace that declaration with one of *probabilistic uniqueness* by asking:
136135

137136
- What risk of a repeat are you willing to accept?
138137

@@ -419,7 +418,7 @@ Note how the number of bytes needed is dependent on the number of characters in
419418

420419
[TOC](#TOC)
421420

422-
## <a name="TLDR2"></a>TL;DR T2
421+
## <a name="TLDR2"></a>TL;DR 2
423422

424423
### Take Away
425424

@@ -428,17 +427,17 @@ Note how the number of bytes needed is dependent on the number of characters in
428427
- You don't need truly unique strings.
429428
- Uniqueness is too onerous. You'll do fine with probabilistically unique strings.
430429
- Probabilistic uniqueness involves measured risk.
431-
- Risk is measured as *"1 in __n__ chance of generating a repeat"*
430+
- Risk measured as *"1 in __n__ chance of generating a repeat"*
432431
- Bits of entropy gives you that measure.
433432
- You need to a total of **_N_** strings with a risk **_1/n_** of repeat.
434433
- The characters are arbitrary.
435434
- You need `entropy-string`.
436435

436+
##### In a *million* strings, a *1 in a billion* chance of a repeat (using 32 possible characters):
437437
```js
438438
const entropy = require('entropy-string')
439-
let N = 1000000
440-
let n = 1000000000
441-
let bits = entropy.bits(N, n)
439+
440+
let bits = entropy.bits(1000000, 1000000000)
442441
let string = entropy.string(bits, entropy.charSet32)
443442
```
444443

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "entropy-string",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"description": "Efficiently generate cryptographically strong random strings of specified entropy from various character sets.",
55
"main": "entropy-string.js",
66
"directories": {

0 commit comments

Comments
 (0)