@classmethod
def convert_to_native(cls, algorithm):
    """Converts algorithm enum value to native value

        Args:
            algorithm: algorithm for conversion.

        Returns:
            Native library algorithm id.

        Raises:
            UnknownAlgorithmException: if algorithm is not supported.
        """
    if algorithm in cls._ALGORITHMS_TO_NATIVE:
        return cls._ALGORITHMS_TO_NATIVE[algorithm]
    raise cls.UnknownAlgorithmException(algorithm)
