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
The caveat with the usage above is that every time you create your `Optimus` instance it will have a random component, even with using the same prime, so a proper usage should be like this:
33
33
34
-
```
34
+
```python
35
35
from optimus_ids import Optimus
36
36
my_optimus = Optimus(
37
37
prime=<your prime number>,
@@ -41,17 +41,18 @@ my_int_id = <some id you have>
To generate a suitable random number you could do this:
47
+
48
+
```python
48
49
from optimus_ids import rand_n, MAX_64_INT# use 32 instead of 64 if you want to
49
50
my_random_number = rand_n(MAX_64_INT-1)
50
51
```
51
52
52
-
You can also generate an `Optimus` intance and then keep its `prime`, `inverese` and `random` properties stored, so you can always configure a new instance with the same components, or even pickle it:
53
+
You can also generate an `Optimus` intance and then keep its `prime`, `inverse` and `random` properties stored, so you can always configure a new instance with the same components, or even pickle it:
0 commit comments