    {-# LINE 1 "src/Crypto/Argon2/FFI.hsc" #-}
    {-# LANGUAGE ForeignFunctionInterface #-}
    {-# LINE 2 "src/Crypto/Argon2/FFI.hsc" #-}
    {-# LANGUAGE PatternSynonyms #-}

    module Crypto.Argon2.FFI where

    {-# LINE 7 "src/Crypto/Argon2/FFI.hsc" #-}

    {-# LINE 8 "src/Crypto/Argon2/FFI.hsc" #-}

    import Foreign
    import Foreign.C

    foreign import ccall unsafe "argon2.h argon2i_hash_encoded" argon2i_hash_encoded :: (Word32) -> (Word32) -> (Word32) -> Ptr a -> CSize -> Ptr b -> CSize -> CSize -> CString -> CSize -> IO (Int32)
    {-# LINE 13 "src/Crypto/Argon2/FFI.hsc" #-}

    foreign import ccall unsafe "argon2.h argon2i_hash_raw" argon2i_hash_raw :: (Word32) -> (Word32) -> (Word32) -> Ptr a -> CSize -> Ptr b -> CSize -> Ptr c -> CSize -> IO (Int32)
    {-# LINE 15 "src/Crypto/Argon2/FFI.hsc" #-}

    foreign import ccall unsafe "argon2.h argon2d_hash_encoded" argon2d_hash_encoded :: (Word32) -> (Word32) -> (Word32) -> Ptr a -> CSize -> Ptr b -> CSize -> CSize -> CString -> CSize -> IO (Int32)
    {-# LINE 17 "src/Crypto/Argon2/FFI.hsc" #-}

    foreign import ccall unsafe "argon2.h argon2d_hash_raw" argon2d_hash_raw :: (Word32) -> (Word32) -> (Word32) -> Ptr a -> CSize -> Ptr b -> CSize -> Ptr c -> CSize -> IO (Int32)
    {-# LINE 19 "src/Crypto/Argon2/FFI.hsc" #-}

    foreign import ccall unsafe "argon2.h argon2i_verify" argon2i_verify :: CString -> Ptr a -> CSize -> IO (Int32)
    {-# LINE 21 "src/Crypto/Argon2/FFI.hsc" #-}

    foreign import ccall unsafe "argon2.h argon2d_verify" argon2d_verify :: CString -> Ptr a -> CSize -> IO (Int32)
    {-# LINE 23 "src/Crypto/Argon2/FFI.hsc" #-}

    foreign import ccall unsafe "argon2.h argon2_encodedlen" argon2_encodedlen :: (Word32) -> (Word32) -> (Word32) -> (Word32) -> (Word32) -> IO CSize
    {-# LINE 25 "src/Crypto/Argon2/FFI.hsc" #-}

    pattern ARGON2_OK = (0)
    {-# LINE 27 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_OUTPUT_PTR_NULL = (-1)
    {-# LINE 28 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_OUTPUT_TOO_SHORT = (-2)
    {-# LINE 29 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_OUTPUT_TOO_LONG = (-3)
    {-# LINE 30 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_PWD_TOO_SHORT = (-4)
    {-# LINE 31 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_PWD_TOO_LONG = (-5)
    {-# LINE 32 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_SALT_TOO_SHORT = (-6)
    {-# LINE 33 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_SALT_TOO_LONG = (-7)
    {-# LINE 34 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_AD_TOO_SHORT = (-8)
    {-# LINE 35 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_AD_TOO_LONG = (-9)
    {-# LINE 36 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_SECRET_TOO_SHORT = (-10)
    {-# LINE 37 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_SECRET_TOO_LONG = (-11)
    {-# LINE 38 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_TIME_TOO_SMALL = (-12)
    {-# LINE 39 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_TIME_TOO_LARGE = (-13)
    {-# LINE 40 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_MEMORY_TOO_LITTLE = (-14)
    {-# LINE 41 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_MEMORY_TOO_MUCH = (-15)
    {-# LINE 42 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_LANES_TOO_FEW = (-16)
    {-# LINE 43 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_LANES_TOO_MANY = (-17)
    {-# LINE 44 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_PWD_PTR_MISMATCH = (-18)
    {-# LINE 45 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_SALT_PTR_MISMATCH = (-19)
    {-# LINE 46 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_SECRET_PTR_MISMATCH = (-20)
    {-# LINE 47 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_AD_PTR_MISMATCH = (-21)
    {-# LINE 48 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_MEMORY_ALLOCATION_ERROR = (-22)
    {-# LINE 49 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_FREE_MEMORY_CBK_NULL = (-23)
    {-# LINE 50 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_ALLOCATE_MEMORY_CBK_NULL = (-24)
    {-# LINE 51 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_INCORRECT_PARAMETER = (-25)
    {-# LINE 52 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_INCORRECT_TYPE = (-26)
    {-# LINE 53 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_OUT_PTR_MISMATCH = (-27)
    {-# LINE 54 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_THREADS_TOO_FEW = (-28)
    {-# LINE 55 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_THREADS_TOO_MANY = (-29)
    {-# LINE 56 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_MISSING_ARGS = (-30)
    {-# LINE 57 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_ENCODING_FAIL = (-31)
    {-# LINE 58 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_DECODING_FAIL = (-32)
    {-# LINE 59 "src/Crypto/Argon2/FFI.hsc" #-}

    pattern ARGON2_MIN_LANES = (1)
    {-# LINE 61 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_MAX_LANES = (16777215)
    {-# LINE 62 "src/Crypto/Argon2/FFI.hsc" #-}

    pattern ARGON2_MIN_THREADS = (1)
    {-# LINE 64 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_MAX_THREADS = (16777215)
    {-# LINE 65 "src/Crypto/Argon2/FFI.hsc" #-}

    pattern ARGON2_SYNC_POINTS = (4)
    {-# LINE 67 "src/Crypto/Argon2/FFI.hsc" #-}

    pattern ARGON2_MIN_OUTLEN = (4)
    {-# LINE 69 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_MAX_OUTLEN = (4294967295)
    {-# LINE 70 "src/Crypto/Argon2/FFI.hsc" #-}

    pattern ARGON2_MIN_MEMORY = (8)
    {-# LINE 72 "src/Crypto/Argon2/FFI.hsc" #-}

    pattern ARGON2_MAX_MEMORY_BITS = (32)
    {-# LINE 74 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_MAX_MEMORY = (4294967295)
    {-# LINE 75 "src/Crypto/Argon2/FFI.hsc" #-}

    pattern ARGON2_MIN_TIME = (1)
    {-# LINE 77 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_MAX_TIME = (4294967295)
    {-# LINE 78 "src/Crypto/Argon2/FFI.hsc" #-}

    pattern ARGON2_MIN_PWD_LENGTH = (0)
    {-# LINE 80 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_MAX_PWD_LENGTH = (4294967295)
    {-# LINE 81 "src/Crypto/Argon2/FFI.hsc" #-}

    pattern ARGON2_MIN_AD_LENGTH = (0)
    {-# LINE 83 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_MAX_AD_LENGTH = (4294967295)
    {-# LINE 84 "src/Crypto/Argon2/FFI.hsc" #-}

    pattern ARGON2_MIN_SALT_LENGTH = (8)
    {-# LINE 86 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_MAX_SALT_LENGTH = (4294967295)
    {-# LINE 87 "src/Crypto/Argon2/FFI.hsc" #-}

    pattern ARGON2_MIN_SECRET = (0)
    {-# LINE 89 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_MAX_SECRET = (4294967295)
    {-# LINE 90 "src/Crypto/Argon2/FFI.hsc" #-}

    pattern ARGON2_FLAG_CLEAR_PASSWORD = (1)
    {-# LINE 92 "src/Crypto/Argon2/FFI.hsc" #-}
    pattern ARGON2_FLAG_CLEAR_SECRET = (2)
    {-# LINE 93 "src/Crypto/Argon2/FFI.hsc" #-}
    -- This got removed, see 78d2a579fec204d7f50ecbe79e71ca33b6a60c1c
    -- pattern ARGON2_FLAG_CLEAR_MEMORY = (#const ARGON2_FLAG_CLEAR_MEMORY)
    pattern ARGON2_DEFAULT_FLAGS = (0)
    {-# LINE 96 "src/Crypto/Argon2/FFI.hsc" #-}