def __init__(self, key): from cryptography.hazmat.backends.openssl.backend import backend if not backend.poly1305_supported(): raise UnsupportedAlgorithm( "poly1305 is not supported by this version of OpenSSL.", _Reasons.UNSUPPORTED_MAC) self._ctx = backend.create_poly1305_ctx(key)
def __init__(self, key): from cryptography.hazmat.backends.openssl.backend import backend if not backend.poly1305_supported(): raise UnsupportedAlgorithm( "poly1305 is not supported by this version of OpenSSL.", _Reasons.UNSUPPORTED_MAC ) self._ctx = backend.create_poly1305_ctx(key)