Skip to content

Commit 2ef6d0d

Browse files
committed
update docs to describe the new parameters layout
1 parent 5135756 commit 2ef6d0d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,15 +273,16 @@ To override the default parameters, include a `params=` value when you create
273273
the SPAKE2 instance. Both sides must use the same parameters.
274274

275275
```python
276-
from spake2 import SPAKE2_A, params
277-
s = SPAKE2_A(b"password", params=params.Params3072)
276+
from spake2 import SPAKE2_A
277+
from spake2.parameters.i3072 import Params3072
278+
s = SPAKE2_A(b"password", params=Params3072)
278279
```
279280

280281
Note that if you serialize an instance with non-default `params=`, you must
281282
restore it with the same parameters, otherwise you will get an exception:
282283

283284
```python
284-
s = SPAKE2_A.from_serialized(data, params=params.Params3072)
285+
s = SPAKE2_A.from_serialized(data, params=Params3072)
285286
```
286287

287288
This library is very much *not* constant-time, and does not protect against

0 commit comments

Comments
 (0)