module Botan.Version
( botanFFIAPIVersion
, botanFFISupportsAPI
, botanVersionText
, botanVersionMajor
, botanVersionMinor
, botanVersionPatch
, botanVersionDatestamp
) where
import System.IO.Unsafe
import qualified Botan.Low.Version as Low
import qualified Data.Text.Encoding as Text
import Botan.Prelude
botanFFIAPIVersion :: Int
botanFFIAPIVersion :: Int
botanFFIAPIVersion = IO Int -> Int
forall a. IO a -> a
unsafeDupablePerformIO IO Int
Low.botanFFIAPIVersion
botanFFISupportsAPI :: Int -> Bool
botanFFISupportsAPI :: Int -> Bool
botanFFISupportsAPI Int
version = IO Bool -> Bool
forall a. IO a -> a
unsafeDupablePerformIO (IO Bool -> Bool) -> IO Bool -> Bool
forall a b. (a -> b) -> a -> b
$ Int -> IO Bool
Low.botanFFISupportsAPI Int
version
botanVersionText :: Text
botanVersionText :: Text
botanVersionText = IO Text -> Text
forall a. IO a -> a
unsafeDupablePerformIO (IO Text -> Text) -> IO Text -> Text
forall a b. (a -> b) -> a -> b
$ (ByteString -> Text) -> IO ByteString -> IO Text
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ByteString -> Text
Text.decodeUtf8 IO ByteString
Low.botanVersionString
botanVersionMajor :: Int
botanVersionMajor :: Int
botanVersionMajor = IO Int -> Int
forall a. IO a -> a
unsafeDupablePerformIO IO Int
Low.botanVersionMajor
botanVersionMinor :: Int
botanVersionMinor :: Int
botanVersionMinor = IO Int -> Int
forall a. IO a -> a
unsafeDupablePerformIO IO Int
Low.botanVersionMinor
botanVersionPatch :: Int
botanVersionPatch :: Int
botanVersionPatch = IO Int -> Int
forall a. IO a -> a
unsafeDupablePerformIO IO Int
Low.botanVersionPatch
botanVersionDatestamp :: Int
botanVersionDatestamp :: Int
botanVersionDatestamp = IO Int -> Int
forall a. IO a -> a
unsafeDupablePerformIO IO Int
Low.botanVersionDatestamp