We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c513e6 commit c0c9d1aCopy full SHA for c0c9d1a
1 file changed
README.md
@@ -28,20 +28,20 @@ And then, you can use it as follows:
28
29
**COSE API**
30
31
-```pycon
+```py
32
>>> from cwt import COSE, COSEKey
33
>>> ctx = COSE.new()
34
>>> mac_key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")
35
>>> encoded = ctx.encode_and_mac(b"Hello world!", mac_key, unprotected={"alg": "HS256"})
36
>>> encoded.hex()
37
-'d18443a10105a1044230314c48656c6c6f20776f726c642158205d0b144add282ccaac32a02e0d5eec76928ccadf3623271eb48e9464e2ee03b2'
+'d18443a10105a1044230314c48656c6c6f20776f726c64215820'...
38
>>> ctx.decode(encoded, mac_key)
39
b'Hello world!'
40
```
41
42
**CWT API**
43
44
45
>>> import cwt
46
>>> from cwt import COSEKey
47
>>> key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")
0 commit comments