> For the complete documentation index, see [llms.txt](https://blockthon.gitbook.io/blockthon/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blockthon.gitbook.io/blockthon/bytes-seed/bytes-to-private-key.md).

# Bytes To Private Key

convert bytes seed to private key hex

### Convert and Generated Bytes To Private Key (HEX)

```python
from Blockthon.Wallet import getBytes, Bytes_To_PrivateKey
# generated random bytes without repeat
bytes_str = getBytes()
# convert bytes to hex private key
privatekey = Bytes_To_PrivateKey(bytestring=bytes_str)
```
