2020-05-16 16:38:11 +00:00
|
|
|
# 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)
|
|
|
|
|
2020-05-16 16:38:11 +00:00
|
|
|
## Cryptography primitives for Hypercore
|
|
|
|
|
2020-07-07 13:31:26 +00:00
|
|
|
## Install
|
|
|
|
|
2020-05-16 16:38:11 +00:00
|
|
|
```sh
|
|
|
|
$ pip install hypercore-crypto
|
|
|
|
```
|
2020-07-07 13:31:26 +00:00
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
```python
|
|
|
|
from hypercore_crypto import data, key_pair
|
|
|
|
from pysodium import crypto_sign_PUBLICKEYBYTES
|
|
|
|
|
|
|
|
public_key, secret_key = key_pair()
|
|
|
|
assert len(public_key) == crypto_sign_PUBLICKEYBYTES
|
|
|
|
print(data(b"hello world").hex())
|
|
|
|
```
|