mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 14:14:22 +01:00
15 lines
394 B
Python
15 lines
394 B
Python
import re
|
|
from hashlib import sha256
|
|
from binascii import hexlify, unhexlify
|
|
from cryptography.hazmat.primitives.ciphers.aead import ChaCha20Poly1305
|
|
|
|
from apps.cli import logger
|
|
|
|
|
|
class Blob:
|
|
def __init__(self, data):
|
|
if type(data) is not str or re.search(r"^[0-9A-Fa-f]+$", data) is None:
|
|
raise ValueError("Non-Hex character found in txid.")
|
|
|
|
self.data = data
|