@@ -6,7 +6,7 @@ Efficiently generate cryptographically strong random strings of specified entrop
66
77### <a name =" TOC " ></a >TOC
88 - [ Installation] ( #Installation )
9- - [ TL;DR ] ( #TLDR )
9+ - [ Usage ] ( #Usage )
1010 - [ Overview] ( #Overview )
1111 - [ Real Need] ( #RealNeed )
1212 - [ More Examples] ( #MoreExamples )
@@ -38,18 +38,7 @@ Efficiently generate cryptographically strong random strings of specified entrop
3838
3939[ TOC] ( #TOC )
4040
41- ### <a name =" TLDR " ></a >TL;DR
42-
43- #### Examples
44-
45- Run any of the examples in the ` examples ` directory by:
46-
47- ``` bash
48- yarn examples
49- node examples/dist/tldr_1.js
50- ```
51-
52- #### Usage
41+ ### <a name =" Usage " ></a >Usage
5342
5443##### Generate strings as an efficient replacement to using version 4 UUIDs
5544
@@ -135,6 +124,15 @@ Or perhaps you need an 256-bit token using [RFC 4648](https://tools.ietf.org/htm
135124
136125 > t-Z8b9FLvpc-roln2BZnGYLZAX_pn5U7uO_cbfldsIt
137126
127+ #### Examples
128+
129+ Run any of the examples in the ` examples ` directory by:
130+
131+ ``` bash
132+ yarn examples
133+ node examples/dist/tldr_1.js
134+ ```
135+
138136[ TOC] ( #TOC )
139137
140138### <a name =" Overview " ></a >Overview
@@ -665,22 +663,20 @@ Version 4 changes:
665663
666664[ TOC] ( #TOC )
667665
668- ### <a name =" TLDR2 " ></a >TL;DR 2
669-
670- #### Take Away
666+ ### <a name =" TakeAway " ></a >Take Away
671667
672- - Don't specify randomness using strings of length
668+ - Don't specify randomness using string length
673669 - String length is a by-product, not a goal
674670 - Don't require truly uniqueness
675671 - You'll do fine with probabilistically uniqueness
676- - Probabilistic uniqueness involves specified risk
672+ - Probabilistic uniqueness involves risk
677673 - Risk is specified as * "1 in __ n__ chance of generating a repeat"*
678- - Do specify bits of entropy
679- - Specified as the risk of repeat in a total number of strings
674+ - Explicity specify your intent
675+ - Specified entropy as the risk of repeat in a total number of strings
680676 - Characters used are arbitrary
681677 - You need ` EntropyString ` , not UUIDs
682678
683- ##### Base 32 character string with a 1 in a trillion chance of a repeat for 10 million strings :
679+ ##### 10 million strings with a 1 in a trillion chance of a repeat:
684680
685681``` js
686682 const { Entropy } = require (' entropy-string' )
0 commit comments