Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Pure implementations of the SHA suite of hash functions. The implementation is basically an unoptimized translation of FIPS 180-2 into Haskell. If you're looking for performance, you probably won't find it here.
Synopsis
- data SHA256State = SHA256S !Word32 !Word32 !Word32 !Word32 !Word32 !Word32 !Word32 !Word32
- data SHA512State = SHA512S !Word64 !Word64 !Word64 !Word64 !Word64 !Word64 !Word64 !Word64
- data SHA256Block = SHA256Block !Word32 !Word32 !Word32 !Word32 !Word32 !Word32 !Word32 !Word32 !Word32 !Word32 !Word32 !Word32 !Word32 !Word32 !Word32 !Word32
- data SHA512Block = SHA512Block !Word64 !Word64 !Word64 !Word64 !Word64 !Word64 !Word64 !Word64 !Word64 !Word64 !Word64 !Word64 !Word64 !Word64 !Word64 !Word64
- processSHA512Block :: SHA512State -> SHA512Block -> SHA512State
- processSHA256Block :: SHA256State -> SHA256Block -> SHA256State
- initialSHA224State :: SHA256State
- initialSHA256State :: SHA256State
- initialSHA384State :: SHA512State
- initialSHA512State :: SHA512State
- toBigEndianSBS :: (Integral a, Bits a) => Int -> a -> ByteString
- fromBigEndianSBS :: (Integral a, Bits a) => ByteString -> a
- calc_k :: Word64 -> Word64 -> Word64 -> Word64
- padSHA1 :: ByteString -> ByteString
- padSHA512 :: ByteString -> ByteString
- padSHA1Chunks :: Int -> [ByteString]
- padSHA512Chunks :: Int -> [ByteString]
Documentation
data SHA256Block Source #
data SHA512Block Source #
Raw SHA block functions
Internal routines included for testing
toBigEndianSBS :: (Integral a, Bits a) => Int -> a -> ByteString Source #
fromBigEndianSBS :: (Integral a, Bits a) => ByteString -> a Source #
padSHA1 :: ByteString -> ByteString Source #
padSHA512 :: ByteString -> ByteString Source #
padSHA1Chunks :: Int -> [ByteString] Source #
padSHA512Chunks :: Int -> [ByteString] Source #