hypercore-crypto/README.md

31 lines
596 B
Markdown
Raw Permalink Normal View History

# hypercore-crypto
2020-05-16 16:38:51 +00:00
[![Build Status](https://drone.autonomic.zone/api/badges/hyperpy/hypercore-crypto/status.svg)](https://drone.autonomic.zone/hyperpy/hypercore-crypto)
## Cryptography primitives for Hypercore
2020-07-07 13:31:26 +00:00
## Install
```sh
$ pip install hypercore-crypto
```
2020-07-07 13:31:26 +00:00
## Example
```python
from pysodium import crypto_sign_PUBLICKEYBYTES
2020-08-05 06:31:12 +00:00
from hypercore_crypto import data, key_pair
2020-07-07 13:31:26 +00:00
public_key, secret_key = key_pair()
assert len(public_key) == crypto_sign_PUBLICKEYBYTES
2020-08-05 06:31:12 +00:00
2020-07-07 13:31:26 +00:00
print(data(b"hello world").hex())
```
2020-08-05 06:31:12 +00:00
Output:
```sh
ccfa4259ee7c41e411e5770973a49c5ceffb5272d6a37f2c6f2dac2190f7e2b7
```