Skip to content

Commit

Permalink
Update README.md (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
kigawas authored Nov 21, 2019
1 parent 0c2066f commit 4b1fd2a
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ Install with `pip install eciespy` under Python 3.5+.
>>> from ecies.utils import generate_eth_key, generate_key
>>> from ecies import encrypt, decrypt
>>> eth_k = generate_eth_key()
>>> prvhex = eth_k.to_hex()
>>> pubhex = eth_k.public_key.to_hex()
>>> prvhex = eth_k.to_hex() # hex string
>>> pubhex = eth_k.public_key.to_hex() # hex string
>>> data = b'this is a test'
>>> decrypt(prvhex, encrypt(pubhex, data))
b'this is a test'
>>> secp_k = generate_key()
>>> prvhex = secp_k.to_hex()
>>> pubhex = secp_k.public_key.format(True).hex()
>>> decrypt(prvhex, encrypt(pubhex, data))
>>> sk_bytes = secp_k.secret # bytes
>>> pk_bytes = secp_k.public_key.format(True) # bytes
>>> decrypt(sk_bytes, encrypt(pk_bytes, data))
b'this is a test'
```

Expand Down Expand Up @@ -253,6 +253,12 @@ b'helloworld'
## Release Notes

### 0.3.1

- Support Python 3.8
- Bump dependencies
- Update documentation

### 0.3.0

- API change: use `HKDF-sha256` to derive shared keys instead of `sha256`
Expand Down

0 comments on commit 4b1fd2a

Please sign in to comment.