| Copyright | (c) Max Amanshauser 2021 |
|---|---|
| License | MIT |
| Maintainer | max@lambdalifting.org |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Crypto.Saltine.Internal.Hash
Description
Synopsis
- hash_bytes :: Int
- shorthash_bytes :: Int
- shorthash_keybytes :: Int
- generichash_bytes_max :: Int
- generichash_keybytes_max :: Int
- hash_sha256_bytes :: Int
- c_hash :: Ptr CChar -> Ptr CChar -> CULLong -> IO CInt
- c_shorthash :: Ptr CChar -> Ptr CChar -> CULLong -> Ptr CChar -> IO CInt
- c_generichash :: Ptr CChar -> CULLong -> Ptr CChar -> CULLong -> Ptr CChar -> CULLong -> IO CInt
- c_hash_sha256 :: Ptr CChar -> Ptr CChar -> CULLong -> IO CInt
- nullShKey :: ShorthashKey
- shorthash :: ShorthashKey -> ByteString -> ByteString
- newtype ShorthashKey = ShK {
- unShK :: ByteString
- newtype GenerichashKey = GhK {
- unGhK :: ByteString
- newtype GenerichashOutLen = GhOL {}
Documentation
hash_bytes :: Int Source #
The size of a hash resulting from
hash.
shorthash_bytes :: Int Source #
The size of a keyed hash resulting from
shorthash.
shorthash_keybytes :: Int Source #
The size of a hashing key for the keyed hash function
shorthash.
generichash_bytes_max :: Int Source #
The maximum output size of the generic hash function
generichash
generichash_keybytes_max :: Int Source #
The maximum key size of the generic hash function
generichash
hash_sha256_bytes :: Int Source #
The size of a hash resulting from
sha256.
nullShKey :: ShorthashKey Source #
Used for our Show instances
Arguments
| :: ShorthashKey | |
| -> ByteString | Message |
| -> ByteString | Hash |
Computes a very short, fast keyed hash. This function is defined here to break circulat module imports
newtype ShorthashKey Source #
An opaque shorthash cryptographic secret key.
Constructors
| ShK | |
Fields
| |
Instances
newtype GenerichashKey Source #
An opaque generichash cryptographic secret key.
Constructors
| GhK | |
Fields
| |
Instances
| NFData GenerichashKey Source # | |||||
Defined in Crypto.Saltine.Internal.Hash Methods rnf :: GenerichashKey -> () # | |||||
| Data GenerichashKey Source # | |||||
Defined in Crypto.Saltine.Internal.Hash Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GenerichashKey -> c GenerichashKey # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GenerichashKey # toConstr :: GenerichashKey -> Constr # dataTypeOf :: GenerichashKey -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c GenerichashKey) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GenerichashKey) # gmapT :: (forall b. Data b => b -> b) -> GenerichashKey -> GenerichashKey # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GenerichashKey -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GenerichashKey -> r # gmapQ :: (forall d. Data d => d -> u) -> GenerichashKey -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GenerichashKey -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GenerichashKey -> m GenerichashKey # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GenerichashKey -> m GenerichashKey # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GenerichashKey -> m GenerichashKey # | |||||
| Generic GenerichashKey Source # | |||||
Defined in Crypto.Saltine.Internal.Hash Associated Types
Methods from :: GenerichashKey -> Rep GenerichashKey x # to :: Rep GenerichashKey x -> GenerichashKey # | |||||
| Show GenerichashKey Source # | |||||
Defined in Crypto.Saltine.Internal.Hash Methods showsPrec :: Int -> GenerichashKey -> ShowS # show :: GenerichashKey -> String # showList :: [GenerichashKey] -> ShowS # | |||||
| Eq GenerichashKey Source # | |||||
Defined in Crypto.Saltine.Internal.Hash Methods (==) :: GenerichashKey -> GenerichashKey -> Bool # (/=) :: GenerichashKey -> GenerichashKey -> Bool # | |||||
| Ord GenerichashKey Source # | |||||
Defined in Crypto.Saltine.Internal.Hash Methods compare :: GenerichashKey -> GenerichashKey -> Ordering # (<) :: GenerichashKey -> GenerichashKey -> Bool # (<=) :: GenerichashKey -> GenerichashKey -> Bool # (>) :: GenerichashKey -> GenerichashKey -> Bool # (>=) :: GenerichashKey -> GenerichashKey -> Bool # max :: GenerichashKey -> GenerichashKey -> GenerichashKey # min :: GenerichashKey -> GenerichashKey -> GenerichashKey # | |||||
| Hashable GenerichashKey Source # | |||||
Defined in Crypto.Saltine.Internal.Hash | |||||
| IsEncoding GenerichashKey Source # | |||||
Defined in Crypto.Saltine.Internal.Hash Methods encode :: GenerichashKey -> ByteString Source # decode :: ByteString -> Maybe GenerichashKey Source # encoded :: (Choice p, Applicative f) => p GenerichashKey (f GenerichashKey) -> p ByteString (f ByteString) Source # | |||||
| type Rep GenerichashKey Source # | |||||
Defined in Crypto.Saltine.Internal.Hash type Rep GenerichashKey = D1 ('MetaData "GenerichashKey" "Crypto.Saltine.Internal.Hash" "saltine-0.2.2.0-inplace" 'True) (C1 ('MetaCons "GhK" 'PrefixI 'True) (S1 ('MetaSel ('Just "unGhK") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
newtype GenerichashOutLen Source #
Instances
| NFData GenerichashOutLen Source # | |||||
Defined in Crypto.Saltine.Internal.Hash Methods rnf :: GenerichashOutLen -> () # | |||||
| Data GenerichashOutLen Source # | |||||
Defined in Crypto.Saltine.Internal.Hash Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GenerichashOutLen -> c GenerichashOutLen # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GenerichashOutLen # toConstr :: GenerichashOutLen -> Constr # dataTypeOf :: GenerichashOutLen -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c GenerichashOutLen) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GenerichashOutLen) # gmapT :: (forall b. Data b => b -> b) -> GenerichashOutLen -> GenerichashOutLen # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GenerichashOutLen -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GenerichashOutLen -> r # gmapQ :: (forall d. Data d => d -> u) -> GenerichashOutLen -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GenerichashOutLen -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GenerichashOutLen -> m GenerichashOutLen # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GenerichashOutLen -> m GenerichashOutLen # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GenerichashOutLen -> m GenerichashOutLen # | |||||
| Generic GenerichashOutLen Source # | |||||
Defined in Crypto.Saltine.Internal.Hash Associated Types
Methods from :: GenerichashOutLen -> Rep GenerichashOutLen x # to :: Rep GenerichashOutLen x -> GenerichashOutLen # | |||||
| Eq GenerichashOutLen Source # | |||||
Defined in Crypto.Saltine.Internal.Hash Methods (==) :: GenerichashOutLen -> GenerichashOutLen -> Bool # (/=) :: GenerichashOutLen -> GenerichashOutLen -> Bool # | |||||
| Ord GenerichashOutLen Source # | |||||
Defined in Crypto.Saltine.Internal.Hash Methods compare :: GenerichashOutLen -> GenerichashOutLen -> Ordering # (<) :: GenerichashOutLen -> GenerichashOutLen -> Bool # (<=) :: GenerichashOutLen -> GenerichashOutLen -> Bool # (>) :: GenerichashOutLen -> GenerichashOutLen -> Bool # (>=) :: GenerichashOutLen -> GenerichashOutLen -> Bool # max :: GenerichashOutLen -> GenerichashOutLen -> GenerichashOutLen # min :: GenerichashOutLen -> GenerichashOutLen -> GenerichashOutLen # | |||||
| Hashable GenerichashOutLen Source # | |||||
Defined in Crypto.Saltine.Internal.Hash | |||||
| type Rep GenerichashOutLen Source # | |||||
Defined in Crypto.Saltine.Internal.Hash type Rep GenerichashOutLen = D1 ('MetaData "GenerichashOutLen" "Crypto.Saltine.Internal.Hash" "saltine-0.2.2.0-inplace" 'True) (C1 ('MetaCons "GhOL" 'PrefixI 'True) (S1 ('MetaSel ('Just "unGhOL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) | |||||