Skip to content

Commit c0c9d1a

Browse files
committed
Refine example.
1 parent 9c513e6 commit c0c9d1a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,20 @@ And then, you can use it as follows:
2828

2929
**COSE API**
3030

31-
```pycon
31+
```py
3232
>>> from cwt import COSE, COSEKey
3333
>>> ctx = COSE.new()
3434
>>> mac_key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")
3535
>>> encoded = ctx.encode_and_mac(b"Hello world!", mac_key, unprotected={"alg": "HS256"})
3636
>>> encoded.hex()
37-
'd18443a10105a1044230314c48656c6c6f20776f726c642158205d0b144add282ccaac32a02e0d5eec76928ccadf3623271eb48e9464e2ee03b2'
37+
'd18443a10105a1044230314c48656c6c6f20776f726c64215820'...
3838
>>> ctx.decode(encoded, mac_key)
3939
b'Hello world!'
4040
```
4141

4242
**CWT API**
4343

44-
```pycon
44+
```py
4545
>>> import cwt
4646
>>> from cwt import COSEKey
4747
>>> key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")

0 commit comments

Comments
 (0)