Files
python-teos/apps/cli/blob.py
Sergi Delgado Segura a8800ac375 Integrates encryption/decryption within the Cryptographer. Close #63
Includes unittests. Also reformats test_inspector to avoid using cli functions
2019-12-06 13:23:02 +01:00

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