You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+37-2
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ Efficiently generate cryptographically strong random strings of specified entrop
16
16
-[Secure Bytes](#SecureBytes)
17
17
-[Custom Bytes](#CustomBytes)
18
18
-[Entropy Bits](#EntropyBits)
19
+
-[Upgrading To Version 3](#Upgrade)
19
20
-[TL;DR 2](#TLDR2)
20
21
21
22
[TOC](#TOC)
@@ -256,9 +257,9 @@ We'll start with using 32 characters. What 32 characters, you ask? The [Characte
256
257
```swift
257
258
importEntropyString
258
259
259
-
let entropy =Entropy()
260
+
let entropy =Entropy(.charset32)
260
261
var bits = Entropy.bits(for: 10000, risk: 1.0e6)
261
-
var string = entropy.string(bits: bits, using: .charset32)
262
+
var string = entropy.string(bits: bits)
262
263
263
264
print("String: \(string)\n")
264
265
```
@@ -549,6 +550,40 @@ The final line represents the number of entropy bits `N` as a function of the nu
549
550
550
551
[TOC](#TOC)
551
552
553
+
### <aname="Upgrade"></a>Upgrading To Version 3
554
+
555
+
EntropyString version 3 does not introduce any new functionality. The sole purpose of the version 3 release is to simplify and tighten the API. Backward incompatible changes made in this effort necessitated a semantic major release.
556
+
557
+
The two major changes are:
558
+
559
+
- Replace class `EntropyString.Random` with class `EntropyString.Entropy`
560
+
<br/>
561
+
Change all occurrences of `new Random()` to `new Entropy()`
562
+
- Replace all camelCase `charSetNN` with `charsetNN` <br/>
563
+
Change all occurrences of `.charSetNN` to `.charsetNN`
0 commit comments