# Path: beacontools/utils.py
# def data_to_hexstring(data):
#     """Convert an array of binary data to the hex representation as a string."""
#     return hexlify(data_to_binstring(data)).decode('ascii')
# 
# def data_to_binstring(data):
#     """Convert an array of binary data to a binary string."""
#     return array.array('B', data).tobytes()


from ..utils import data_to_hexstring, data_to_binstring
"""Packet classes for Eddystone beacons."""

class ExposureNotificationFrame(object):
    """COVID-19 Exposure Notification frame."""

    def __init__(self, data):
        self._identifier = data_to_hexstring(data['identifier'])

# Path: beacontools/utils.py
# def data_to_hexstring(data):
#     """Convert an array of binary data to the hex representation as a string."""
#     return hexlify(data_to_binstring(data)).decode('ascii')
# 
# def data_to_binstring(data):
#     """Convert an array of binary data to a binary string."""
#     return array.array('B', data).tobytes()


# Path: beacontools/packet_types/exposure_notification.py
from ..utils import data_to_hexstring, data_to_binstring

"""Packet classes for Eddystone beacons."""

class ExposureNotificationFrame(object):
    """COVID-19 Exposure Notification frame."""

    def __init__(self, data):
        self._identifier = data_to_hexstring(data['identifier'])

        self._encrypted_metadata = data_to_binstring(data['encrypted_metadata'])