def from_private_bytes(cls, data):
        from cryptography.hazmat.backends.openssl.backend import backend
        if not backend.x448_supported():
            raise UnsupportedAlgorithm(
                "X448 is not supported by this version of OpenSSL.",
                _Reasons.UNSUPPORTED_EXCHANGE_ALGORITHM)

        return backend.x448_load_private_bytes(data)
Example #2
0
    def from_private_bytes(cls, data):
        from cryptography.hazmat.backends.openssl.backend import backend
        if not backend.x448_supported():
            raise UnsupportedAlgorithm(
                "X448 is not supported by this version of OpenSSL.",
                _Reasons.UNSUPPORTED_EXCHANGE_ALGORITHM
            )

        return backend.x448_load_private_bytes(data)
Example #3
0
 def _from_private_bytes(cls, data):
     from cryptography.hazmat.backends.openssl.backend import backend
     return backend.x448_load_private_bytes(data)