# Path: resources/lib/utils.py
# def uniq_id(delay=1):
#     """
#     Returns a unique id based on the devices MAC address
# 
#     :param delay: Retry delay in sec
#     :type delay: int
#     :returns:  string -- Unique secret
#     """
#     mac_addr = __get_mac_address(delay=delay)
#     if ':' in mac_addr and delay == 2:
#         return hashlib.sha256(str(mac_addr).encode()).digest()
#     else:
#         return hashlib.sha256('UnsafeStaticSecret'.encode()).digest()


import base64
from Cryptodome import Random
from Cryptodome.Cipher import AES
from Cryptodome.Util import Padding
from resources.lib.utils import uniq_id

class NetflixCredentials(object):
    """
    Stuff shared between / used from service and addon"""

    def __init__(self):
        self.bs = 32

# Path: resources/lib/utils.py
# def uniq_id(delay=1):
#     """
#     Returns a unique id based on the devices MAC address
# 
#     :param delay: Retry delay in sec
#     :type delay: int
#     :returns:  string -- Unique secret
#     """
#     mac_addr = __get_mac_address(delay=delay)
#     if ':' in mac_addr and delay == 2:
#         return hashlib.sha256(str(mac_addr).encode()).digest()
#     else:
#         return hashlib.sha256('UnsafeStaticSecret'.encode()).digest()


# Path: resources/lib/NetflixCredentials.py
import base64
from Cryptodome import Random
from Cryptodome.Cipher import AES
from Cryptodome.Util import Padding
from resources.lib.utils import uniq_id


class NetflixCredentials(object):
    """
    Stuff shared between / used from service and addon"""

    def __init__(self):
        self.bs = 32

        self.crypt_key = uniq_id()