> 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-public-key.md).

# Bytes To Public Key

### Convert and Generated Bytes To Public Key

```python
from Blockthon.Wallet import getBytes, Bytes_To_PublicKey
# generated random bytes without repeat
bytes_str = getBytes()
# Convert Bytes To Public Key (un compress)
public_key = Bytes_To_PublicKey(bytes_str)
```

### Convert Bytes To Public Key Compress

```python
from Blockthon.Wallet import getBytes, Bytes_To_PublicKey
# generated random bytes without repeat
bytes_str = getBytes()
# Convert Bytes To Public Key Compress
public_key = Bytes_To_PublicKey(bytes_str, compress=True)
```
