skein-1.0.9.4: Skein, a family of cryptographic hash functions. Includes Skein-MAC as well.
Copyright(c) 2011 Felipe A. Lessa
LicenseBSD3 (see LICENSE)
Maintainerfelipe.lessa@gmail.com
Stabilityprovisional
Portabilityportable (needs FFI)
Safe HaskellSafe-Inferred
LanguageHaskell98

Crypto.Skein.Internal

Description

Basic wrappers around the C library. You shouldn't need to use these functions. Instead, use the high-level Crypto.Skein module.

Synopsis

Return codes

sKEIN_FAIL :: CInt #

check :: IO CInt -> IO () #

Throws exception if the function does not return successfully.

Skein-256

newtype Skein256Ctx #

Constructors

S256Ctx 

Fields

Instances

Instances details
Storable Skein256Ctx # 
Instance details

Defined in Crypto.Skein.Internal

Methods

sizeOf :: Skein256Ctx -> Int

alignment :: Skein256Ctx -> Int

peekElemOff :: Ptr Skein256Ctx -> Int -> IO Skein256Ctx

pokeElemOff :: Ptr Skein256Ctx -> Int -> Skein256Ctx -> IO ()

peekByteOff :: Ptr b -> Int -> IO Skein256Ctx

pokeByteOff :: Ptr b -> Int -> Skein256Ctx -> IO ()

peek :: Ptr Skein256Ctx -> IO Skein256Ctx

poke :: Ptr Skein256Ctx -> Skein256Ctx -> IO ()

skein256Init :: Ptr Skein256Ctx -> CSize -> IO CInt #

skein256Update :: Ptr Skein256Ctx -> Ptr Word8 -> CSize -> IO CInt #

skein256Final :: Ptr Skein256Ctx -> Ptr Word8 -> IO CInt #

skein256InitExt :: Ptr Skein256Ctx -> CSize -> Word64 -> Ptr Word8 -> CSize -> IO CInt #

skein256FinalPad :: Ptr Skein256Ctx -> Ptr Word8 -> IO CInt #

skein256Output :: Ptr Skein256Ctx -> Ptr Word8 -> IO CInt #

Skein-512

newtype Skein512Ctx #

Constructors

S512Ctx 

Fields

Instances

Instances details
Storable Skein512Ctx # 
Instance details

Defined in Crypto.Skein.Internal

Methods

sizeOf :: Skein512Ctx -> Int

alignment :: Skein512Ctx -> Int

peekElemOff :: Ptr Skein512Ctx -> Int -> IO Skein512Ctx

pokeElemOff :: Ptr Skein512Ctx -> Int -> Skein512Ctx -> IO ()

peekByteOff :: Ptr b -> Int -> IO Skein512Ctx

pokeByteOff :: Ptr b -> Int -> Skein512Ctx -> IO ()

peek :: Ptr Skein512Ctx -> IO Skein512Ctx

poke :: Ptr Skein512Ctx -> Skein512Ctx -> IO ()

skein512Init :: Ptr Skein512Ctx -> CSize -> IO CInt #

skein512Update :: Ptr Skein512Ctx -> Ptr Word8 -> CSize -> IO CInt #

skein512Final :: Ptr Skein512Ctx -> Ptr Word8 -> IO CInt #

skein512InitExt :: Ptr Skein512Ctx -> CSize -> Word64 -> Ptr Word8 -> CSize -> IO CInt #

skein512FinalPad :: Ptr Skein512Ctx -> Ptr Word8 -> IO CInt #

skein512Output :: Ptr Skein512Ctx -> Ptr Word8 -> IO CInt #

Skein-1024

newtype Skein1024Ctx #

Constructors

S1024Ctx 

Fields

Instances

Instances details
Storable Skein1024Ctx # 
Instance details

Defined in Crypto.Skein.Internal

Methods

sizeOf :: Skein1024Ctx -> Int

alignment :: Skein1024Ctx -> Int

peekElemOff :: Ptr Skein1024Ctx -> Int -> IO Skein1024Ctx

pokeElemOff :: Ptr Skein1024Ctx -> Int -> Skein1024Ctx -> IO ()

peekByteOff :: Ptr b -> Int -> IO Skein1024Ctx

pokeByteOff :: Ptr b -> Int -> Skein1024Ctx -> IO ()

peek :: Ptr Skein1024Ctx -> IO Skein1024Ctx

poke :: Ptr Skein1024Ctx -> Skein1024Ctx -> IO ()

skein1024Init :: Ptr Skein1024Ctx -> CSize -> IO CInt #

skein1024Update :: Ptr Skein1024Ctx -> Ptr Word8 -> CSize -> IO CInt #

skein1024Final :: Ptr Skein1024Ctx -> Ptr Word8 -> IO CInt #

skein1024InitExt :: Ptr Skein1024Ctx -> CSize -> Word64 -> Ptr Word8 -> CSize -> IO CInt #

skein1024FinalPad :: Ptr Skein1024Ctx -> Ptr Word8 -> IO CInt #

skein1024Output :: Ptr Skein1024Ctx -> Ptr Word8 -> IO CInt #

Misc constants

sKEIN_SEQUENTIAL :: Word64 #

Pass to InitExt to get sequential processing.