saltine-0.2.0.0: Cryptography that's easy to digest (NaCl/libsodium bindings).
Copyright(c) Max Amanshauser 2021
LicenseMIT
Maintainermax@lambdalifting.org
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Crypto.Saltine.Internal.Auth

Description

 
Synopsis

Documentation

auth_bytes :: Int Source #

Size of a crypto_auth authenticator.

auth_keybytes :: Int Source #

Size of a crypto_auth authenticator key.

c_auth Source #

Arguments

:: Ptr CChar

Authenticator output buffer

-> Ptr CChar

Constant message buffer

-> CULLong

Length of message buffer

-> Ptr CChar

Constant key buffer

-> IO CInt

Always 0

c_auth_verify Source #

Arguments

:: Ptr CChar

Constant authenticator buffer

-> Ptr CChar

Constant message buffer

-> CULLong

Length of message buffer

-> Ptr CChar

Constant key buffer

-> CInt

Success if 0, failure if -1

We don't even include this in the IO monad since all of the buffers are constant.

newtype Key Source #

An opaque auth cryptographic key.

Constructors

Key 

Fields

Instances

Instances details
Eq Key Source # 
Instance details

Defined in Crypto.Saltine.Internal.Auth

Methods

(==) :: Key -> Key -> Bool #

(/=) :: Key -> Key -> Bool #

Data Key Source # 
Instance details

Defined in Crypto.Saltine.Internal.Auth

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Key -> c Key #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Key #

toConstr :: Key -> Constr #

dataTypeOf :: Key -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Key) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Key) #

gmapT :: (forall b. Data b => b -> b) -> Key -> Key #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Key -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Key -> r #

gmapQ :: (forall d. Data d => d -> u) -> Key -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Key -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Key -> m Key #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Key -> m Key #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Key -> m Key #

Ord Key Source # 
Instance details

Defined in Crypto.Saltine.Internal.Auth

Methods

compare :: Key -> Key -> Ordering #

(<) :: Key -> Key -> Bool #

(<=) :: Key -> Key -> Bool #

(>) :: Key -> Key -> Bool #

(>=) :: Key -> Key -> Bool #

max :: Key -> Key -> Key #

min :: Key -> Key -> Key #

Show Key Source # 
Instance details

Defined in Crypto.Saltine.Internal.Auth

Methods

showsPrec :: Int -> Key -> ShowS #

show :: Key -> String #

showList :: [Key] -> ShowS #

Generic Key Source # 
Instance details

Defined in Crypto.Saltine.Internal.Auth

Associated Types

type Rep Key :: Type -> Type #

Methods

from :: Key -> Rep Key x #

to :: Rep Key x -> Key #

NFData Key Source # 
Instance details

Defined in Crypto.Saltine.Internal.Auth

Methods

rnf :: Key -> () #

Hashable Key Source # 
Instance details

Defined in Crypto.Saltine.Internal.Auth

Methods

hashWithSalt :: Int -> Key -> Int #

hash :: Key -> Int #

IsEncoding Key Source # 
Instance details

Defined in Crypto.Saltine.Internal.Auth

type Rep Key Source # 
Instance details

Defined in Crypto.Saltine.Internal.Auth

type Rep Key = D1 ('MetaData "Key" "Crypto.Saltine.Internal.Auth" "saltine-0.2.0.0-inplace" 'True) (C1 ('MetaCons "Key" 'PrefixI 'True) (S1 ('MetaSel ('Just "unKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))

newtype Authenticator Source #

An opaque auth authenticator.

Constructors

Au 

Fields

Instances

Instances details
Eq Authenticator Source # 
Instance details

Defined in Crypto.Saltine.Internal.Auth

Data Authenticator Source # 
Instance details

Defined in Crypto.Saltine.Internal.Auth

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Authenticator -> c Authenticator #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Authenticator #

toConstr :: Authenticator -> Constr #

dataTypeOf :: Authenticator -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Authenticator) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Authenticator) #

gmapT :: (forall b. Data b => b -> b) -> Authenticator -> Authenticator #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Authenticator -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Authenticator -> r #

gmapQ :: (forall d. Data d => d -> u) -> Authenticator -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Authenticator -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Authenticator -> m Authenticator #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Authenticator -> m Authenticator #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Authenticator -> m Authenticator #

Ord Authenticator Source # 
Instance details

Defined in Crypto.Saltine.Internal.Auth

Show Authenticator Source # 
Instance details

Defined in Crypto.Saltine.Internal.Auth

Generic Authenticator Source # 
Instance details

Defined in Crypto.Saltine.Internal.Auth

Associated Types

type Rep Authenticator :: Type -> Type #

NFData Authenticator Source # 
Instance details

Defined in Crypto.Saltine.Internal.Auth

Methods

rnf :: Authenticator -> () #

Hashable Authenticator Source # 
Instance details

Defined in Crypto.Saltine.Internal.Auth

IsEncoding Authenticator Source # 
Instance details

Defined in Crypto.Saltine.Internal.Auth

type Rep Authenticator Source # 
Instance details

Defined in Crypto.Saltine.Internal.Auth

type Rep Authenticator = D1 ('MetaData "Authenticator" "Crypto.Saltine.Internal.Auth" "saltine-0.2.0.0-inplace" 'True) (C1 ('MetaCons "Au" 'PrefixI 'True) (S1 ('MetaSel ('Just "unAu") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))