Fix up README example
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Luke Murphy 2020-08-05 08:31:12 +02:00
parent b3f6204808
commit 3b22aef4b6
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 9 additions and 1 deletions

View File

@ -13,10 +13,18 @@ $ pip install hypercore-crypto
## Example
```python
from hypercore_crypto import data, key_pair
from pysodium import crypto_sign_PUBLICKEYBYTES
from hypercore_crypto import data, key_pair
public_key, secret_key = key_pair()
assert len(public_key) == crypto_sign_PUBLICKEYBYTES
print(data(b"hello world").hex())
```
Output:
```sh
ccfa4259ee7c41e411e5770973a49c5ceffb5272d6a37f2c6f2dac2190f7e2b7
```