{-# LANGUAGE BangPatterns, CPP, FlexibleInstances #-}
module Data.Digest.Pure.SHA
(
Digest
, SHA1State, SHA256State, SHA512State
, showDigest
, integerDigest
, bytestringDigest
, sha1
, sha224
, sha256
, sha384
, sha512
, sha1Incremental
, completeSha1Incremental
, sha224Incremental
, completeSha224Incremental
, sha256Incremental
, completeSha256Incremental
, sha384Incremental
, completeSha384Incremental
, sha512Incremental
, completeSha512Incremental
, hmacSha1
, hmacSha224
, hmacSha256
, hmacSha384
, hmacSha512
, toBigEndianSBS, fromBigEndianSBS
, calc_k
, padSHA1, padSHA512
, padSHA1Chunks, padSHA512Chunks
)
where
import Data.Binary
import Data.Binary.Get
import Data.Binary.Put
import Data.Bits
import Data.ByteString.Lazy(ByteString)
import qualified Data.ByteString.Lazy as BS
import qualified Data.ByteString as SBS
import Data.Char (intToDigit)
import Data.List (foldl')
newtype Digest t = Digest ByteString deriving (Digest t -> Digest t -> Bool
(Digest t -> Digest t -> Bool)
-> (Digest t -> Digest t -> Bool) -> Eq (Digest t)
forall t. Digest t -> Digest t -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: forall t. Digest t -> Digest t -> Bool
== :: Digest t -> Digest t -> Bool
$c/= :: forall t. Digest t -> Digest t -> Bool
/= :: Digest t -> Digest t -> Bool
Eq,Eq (Digest t)
Eq (Digest t) =>
(Digest t -> Digest t -> Ordering)
-> (Digest t -> Digest t -> Bool)
-> (Digest t -> Digest t -> Bool)
-> (Digest t -> Digest t -> Bool)
-> (Digest t -> Digest t -> Bool)
-> (Digest t -> Digest t -> Digest t)
-> (Digest t -> Digest t -> Digest t)
-> Ord (Digest t)
Digest t -> Digest t -> Bool
Digest t -> Digest t -> Ordering
Digest t -> Digest t -> Digest t
forall t. Eq (Digest t)
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall t. Digest t -> Digest t -> Bool
forall t. Digest t -> Digest t -> Ordering
forall t. Digest t -> Digest t -> Digest t
$ccompare :: forall t. Digest t -> Digest t -> Ordering
compare :: Digest t -> Digest t -> Ordering
$c< :: forall t. Digest t -> Digest t -> Bool
< :: Digest t -> Digest t -> Bool
$c<= :: forall t. Digest t -> Digest t -> Bool
<= :: Digest t -> Digest t -> Bool
$c> :: forall t. Digest t -> Digest t -> Bool
> :: Digest t -> Digest t -> Bool
$c>= :: forall t. Digest t -> Digest t -> Bool
>= :: Digest t -> Digest t -> Bool
$cmax :: forall t. Digest t -> Digest t -> Digest t
max :: Digest t -> Digest t -> Digest t
$cmin :: forall t. Digest t -> Digest t -> Digest t
min :: Digest t -> Digest t -> Digest t
Ord)
instance Show (Digest t) where
show :: Digest t -> String
show = Digest t -> String
forall t. Digest t -> String
showDigest
instance Binary (Digest SHA1State) where
get :: Get (Digest SHA1State)
get = ByteString -> Digest SHA1State
forall t. ByteString -> Digest t
Digest (ByteString -> Digest SHA1State)
-> Get ByteString -> Get (Digest SHA1State)
forall a b. (a -> b) -> Get a -> Get b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
`fmap` Int64 -> Get ByteString
getLazyByteString Int64
20
put :: Digest SHA1State -> Put
put (Digest ByteString
bs) = ByteString -> Put
putLazyByteString ByteString
bs
instance Binary (Digest SHA256State) where
get :: Get (Digest SHA256State)
get = ByteString -> Digest SHA256State
forall t. ByteString -> Digest t
Digest (ByteString -> Digest SHA256State)
-> Get ByteString -> Get (Digest SHA256State)
forall a b. (a -> b) -> Get a -> Get b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
`fmap` Int64 -> Get ByteString
getLazyByteString Int64
32
put :: Digest SHA256State -> Put
put (Digest ByteString
bs) = ByteString -> Put
putLazyByteString ByteString
bs
instance Binary (Digest SHA512State) where
get :: Get (Digest SHA512State)
get = ByteString -> Digest SHA512State
forall t. ByteString -> Digest t
Digest (ByteString -> Digest SHA512State)
-> Get ByteString -> Get (Digest SHA512State)
forall a b. (a -> b) -> Get a -> Get b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
`fmap` Int64 -> Get ByteString
getLazyByteString Int64
64
put :: Digest SHA512State -> Put
put (Digest ByteString
bs) = ByteString -> Put
putLazyByteString ByteString
bs
data SHA1State = SHA1S !Word32 !Word32 !Word32 !Word32 !Word32
initialSHA1State :: SHA1State
initialSHA1State :: SHA1State
initialSHA1State = Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> SHA1State
SHA1S Word32
0x67452301 Word32
0xefcdab89 Word32
0x98badcfe Word32
0x10325476 Word32
0xc3d2e1f0
data SHA256State = SHA256S !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32
initialSHA224State :: SHA256State
initialSHA224State :: SHA256State
initialSHA224State = Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> SHA256State
SHA256S Word32
0xc1059ed8 Word32
0x367cd507 Word32
0x3070dd17 Word32
0xf70e5939
Word32
0xffc00b31 Word32
0x68581511 Word32
0x64f98fa7 Word32
0xbefa4fa4
initialSHA256State :: SHA256State
initialSHA256State :: SHA256State
initialSHA256State = Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> SHA256State
SHA256S Word32
0x6a09e667 Word32
0xbb67ae85 Word32
0x3c6ef372 Word32
0xa54ff53a
Word32
0x510e527f Word32
0x9b05688c Word32
0x1f83d9ab Word32
0x5be0cd19
data SHA512State = SHA512S !Word64 !Word64 !Word64 !Word64
!Word64 !Word64 !Word64 !Word64
initialSHA384State :: SHA512State
initialSHA384State :: SHA512State
initialSHA384State = Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> SHA512State
SHA512S Word64
0xcbbb9d5dc1059ed8 Word64
0x629a292a367cd507
Word64
0x9159015a3070dd17 Word64
0x152fecd8f70e5939
Word64
0x67332667ffc00b31 Word64
0x8eb44a8768581511
Word64
0xdb0c2e0d64f98fa7 Word64
0x47b5481dbefa4fa4
initialSHA512State :: SHA512State
initialSHA512State :: SHA512State
initialSHA512State = Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> SHA512State
SHA512S Word64
0x6a09e667f3bcc908 Word64
0xbb67ae8584caa73b
Word64
0x3c6ef372fe94f82b Word64
0xa54ff53a5f1d36f1
Word64
0x510e527fade682d1 Word64
0x9b05688c2b3e6c1f
Word64
0x1f83d9abfb41bd6b Word64
0x5be0cd19137e2179
synthesizeSHA1 :: SHA1State -> Put
synthesizeSHA1 :: SHA1State -> Put
synthesizeSHA1 (SHA1S Word32
a Word32
b Word32
c Word32
d Word32
e) = do
Word32 -> Put
putWord32be Word32
a
Word32 -> Put
putWord32be Word32
b
Word32 -> Put
putWord32be Word32
c
Word32 -> Put
putWord32be Word32
d
Word32 -> Put
putWord32be Word32
e
getSHA1 :: Get SHA1State
getSHA1 :: Get SHA1State
getSHA1 = do
Word32
a <- Get Word32
getWord32be
Word32
b <- Get Word32
getWord32be
Word32
c <- Get Word32
getWord32be
Word32
d <- Get Word32
getWord32be
Word32
e <- Get Word32
getWord32be
SHA1State -> Get SHA1State
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (SHA1State -> Get SHA1State) -> SHA1State -> Get SHA1State
forall a b. (a -> b) -> a -> b
$! Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> SHA1State
SHA1S Word32
a Word32
b Word32
c Word32
d Word32
e
synthesizeSHA224 :: SHA256State -> Put
synthesizeSHA224 :: SHA256State -> Put
synthesizeSHA224 (SHA256S Word32
a Word32
b Word32
c Word32
d Word32
e Word32
f Word32
g Word32
_) = do
Word32 -> Put
putWord32be Word32
a
Word32 -> Put
putWord32be Word32
b
Word32 -> Put
putWord32be Word32
c
Word32 -> Put
putWord32be Word32
d
Word32 -> Put
putWord32be Word32
e
Word32 -> Put
putWord32be Word32
f
Word32 -> Put
putWord32be Word32
g
synthesizeSHA256 :: SHA256State -> Put
synthesizeSHA256 :: SHA256State -> Put
synthesizeSHA256 (SHA256S Word32
a Word32
b Word32
c Word32
d Word32
e Word32
f Word32
g Word32
h) = do
Word32 -> Put
putWord32be Word32
a
Word32 -> Put
putWord32be Word32
b
Word32 -> Put
putWord32be Word32
c
Word32 -> Put
putWord32be Word32
d
Word32 -> Put
putWord32be Word32
e
Word32 -> Put
putWord32be Word32
f
Word32 -> Put
putWord32be Word32
g
Word32 -> Put
putWord32be Word32
h
getSHA256 :: Get SHA256State
getSHA256 :: Get SHA256State
getSHA256 = do
Word32
a <- Get Word32
getWord32be
Word32
b <- Get Word32
getWord32be
Word32
c <- Get Word32
getWord32be
Word32
d <- Get Word32
getWord32be
Word32
e <- Get Word32
getWord32be
Word32
f <- Get Word32
getWord32be
Word32
g <- Get Word32
getWord32be
Word32
h <- Get Word32
getWord32be
SHA256State -> Get SHA256State
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (SHA256State -> Get SHA256State) -> SHA256State -> Get SHA256State
forall a b. (a -> b) -> a -> b
$! Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> SHA256State
SHA256S Word32
a Word32
b Word32
c Word32
d Word32
e Word32
f Word32
g Word32
h
synthesizeSHA384 :: SHA512State -> Put
synthesizeSHA384 :: SHA512State -> Put
synthesizeSHA384 (SHA512S Word64
a Word64
b Word64
c Word64
d Word64
e Word64
f Word64
_ Word64
_) = do
Word64 -> Put
putWord64be Word64
a
Word64 -> Put
putWord64be Word64
b
Word64 -> Put
putWord64be Word64
c
Word64 -> Put
putWord64be Word64
d
Word64 -> Put
putWord64be Word64
e
Word64 -> Put
putWord64be Word64
f
synthesizeSHA512 :: SHA512State -> Put
synthesizeSHA512 :: SHA512State -> Put
synthesizeSHA512 (SHA512S Word64
a Word64
b Word64
c Word64
d Word64
e Word64
f Word64
g Word64
h) = do
Word64 -> Put
putWord64be Word64
a
Word64 -> Put
putWord64be Word64
b
Word64 -> Put
putWord64be Word64
c
Word64 -> Put
putWord64be Word64
d
Word64 -> Put
putWord64be Word64
e
Word64 -> Put
putWord64be Word64
f
Word64 -> Put
putWord64be Word64
g
Word64 -> Put
putWord64be Word64
h
getSHA512 :: Get SHA512State
getSHA512 :: Get SHA512State
getSHA512 = do
Word64
a <- Get Word64
getWord64be
Word64
b <- Get Word64
getWord64be
Word64
c <- Get Word64
getWord64be
Word64
d <- Get Word64
getWord64be
Word64
e <- Get Word64
getWord64be
Word64
f <- Get Word64
getWord64be
Word64
g <- Get Word64
getWord64be
Word64
h <- Get Word64
getWord64be
SHA512State -> Get SHA512State
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (SHA512State -> Get SHA512State) -> SHA512State -> Get SHA512State
forall a b. (a -> b) -> a -> b
$! Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> SHA512State
SHA512S Word64
a Word64
b Word64
c Word64
d Word64
e Word64
f Word64
g Word64
h
instance Binary SHA1State where
put :: SHA1State -> Put
put = SHA1State -> Put
synthesizeSHA1
get :: Get SHA1State
get = Get SHA1State
getSHA1
instance Binary SHA256State where
put :: SHA256State -> Put
put = SHA256State -> Put
synthesizeSHA256
get :: Get SHA256State
get = Get SHA256State
getSHA256
instance Binary SHA512State where
put :: SHA512State -> Put
put = SHA512State -> Put
synthesizeSHA512
get :: Get SHA512State
get = Get SHA512State
getSHA512
padSHA1 :: ByteString -> ByteString
padSHA1 :: ByteString -> ByteString
padSHA1 = Word64 -> Word64 -> Int -> ByteString -> ByteString
generic_pad Word64
448 Word64
512 Int
64
padSHA1Chunks :: Int -> [SBS.ByteString]
padSHA1Chunks :: Int -> [ByteString]
padSHA1Chunks = Word64 -> Word64 -> Int -> Int -> [ByteString]
generic_pad_chunks Word64
448 Word64
512 Int
64
padSHA512 :: ByteString -> ByteString
padSHA512 :: ByteString -> ByteString
padSHA512 = Word64 -> Word64 -> Int -> ByteString -> ByteString
generic_pad Word64
896 Word64
1024 Int
128
padSHA512Chunks :: Int -> [SBS.ByteString]
padSHA512Chunks :: Int -> [ByteString]
padSHA512Chunks = Word64 -> Word64 -> Int -> Int -> [ByteString]
generic_pad_chunks Word64
896 Word64
1024 Int
128
generic_pad :: Word64 -> Word64 -> Int -> ByteString -> ByteString
generic_pad :: Word64 -> Word64 -> Int -> ByteString -> ByteString
generic_pad Word64
a Word64
b Int
lSize ByteString
bs =
[ByteString] -> ByteString
BS.fromChunks ([ByteString] -> ByteString) -> [ByteString] -> ByteString
forall a b. (a -> b) -> a -> b
$! Int -> [ByteString] -> [ByteString]
go Int
0 [ByteString]
chunks
where
chunks :: [ByteString]
chunks = ByteString -> [ByteString]
BS.toChunks ByteString
bs
go :: Int -> [ByteString] -> [ByteString]
go !Int
len [] = Word64 -> Word64 -> Int -> Int -> [ByteString]
generic_pad_chunks Word64
a Word64
b Int
lSize Int
len
go !Int
len (ByteString
c:[ByteString]
cs) = ByteString
c ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
: Int -> [ByteString] -> [ByteString]
go (Int
len Int -> Int -> Int
forall a. Num a => a -> a -> a
+ ByteString -> Int
SBS.length ByteString
c) [ByteString]
cs
generic_pad_chunks :: Word64 -> Word64 -> Int -> Int -> [SBS.ByteString]
generic_pad_chunks :: Word64 -> Word64 -> Int -> Int -> [ByteString]
generic_pad_chunks Word64
a Word64
b Int
lSize Int
len =
let lenBits :: Word64
lenBits = Int -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word64) -> Int -> Word64
forall a b. (a -> b) -> a -> b
$ Int
len Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
8
k :: Word64
k = Word64 -> Word64 -> Word64 -> Word64
calc_k Word64
a Word64
b Word64
lenBits
kBytes :: Word64
kBytes = (Word64
k Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
1) Word64 -> Word64 -> Word64
forall a. Integral a => a -> a -> a
`div` Word64
8
nZeroBytes :: Int
nZeroBytes = Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word64 -> Int) -> Word64 -> Int
forall a b. (a -> b) -> a -> b
$! Word64
kBytes Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
- Word64
1
padLength :: ByteString
padLength = Int -> Word64 -> ByteString
forall a. (Integral a, Bits a) => Int -> a -> ByteString
toBigEndianSBS Int
lSize Word64
lenBits
in [Word8 -> ByteString
SBS.singleton Word8
0x80, Int -> Word8 -> ByteString
SBS.replicate Int
nZeroBytes Word8
0, ByteString
padLength]
calc_k :: Word64 -> Word64 -> Word64 -> Word64
calc_k :: Word64 -> Word64 -> Word64 -> Word64
calc_k Word64
a Word64
b Word64
l =
if Integer
r Integer -> Integer -> Bool
forall a. Ord a => a -> a -> Bool
<= -Integer
1
then Integer -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
r Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
b
else Integer -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
r
where
r :: Integer
r = Word64 -> Integer
forall a. Integral a => a -> Integer
toInteger Word64
a Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
- Word64 -> Integer
forall a. Integral a => a -> Integer
toInteger Word64
l Integer -> Integer -> Integer
forall a. Integral a => a -> a -> a
`mod` Word64 -> Integer
forall a. Integral a => a -> Integer
toInteger Word64
b Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
- Integer
1
toBigEndianSBS :: (Integral a, Bits a) => Int -> a -> SBS.ByteString
toBigEndianSBS :: forall a. (Integral a, Bits a) => Int -> a -> ByteString
toBigEndianSBS Int
s a
val = [Word8] -> ByteString
SBS.pack ([Word8] -> ByteString) -> [Word8] -> ByteString
forall a b. (a -> b) -> a -> b
$ (Int -> Word8) -> [Int] -> [Word8]
forall a b. (a -> b) -> [a] -> [b]
map Int -> Word8
forall {b}. Num b => Int -> b
getBits [Int
s Int -> Int -> Int
forall a. Num a => a -> a -> a
- Int
8, Int
s Int -> Int -> Int
forall a. Num a => a -> a -> a
- Int
16 .. Int
0]
where
getBits :: Int -> b
getBits Int
x = a -> b
forall a b. (Integral a, Num b) => a -> b
fromIntegral (a -> b) -> a -> b
forall a b. (a -> b) -> a -> b
$ (a
val a -> Int -> a
forall a. Bits a => a -> Int -> a
`shiftR` Int
x) a -> a -> a
forall a. Bits a => a -> a -> a
.&. a
0xFF
fromBigEndianSBS :: (Integral a, Bits a) => SBS.ByteString -> a
fromBigEndianSBS :: forall a. (Integral a, Bits a) => ByteString -> a
fromBigEndianSBS =
(a -> Word8 -> a) -> a -> ByteString -> a
forall a. (a -> Word8 -> a) -> a -> ByteString -> a
SBS.foldl (\ a
acc Word8
x -> (a
acc a -> Int -> a
forall a. Bits a => a -> Int -> a
`shiftL` Int
8) a -> a -> a
forall a. Num a => a -> a -> a
+ Word8 -> a
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word8
x) a
0
{-# SPECIALIZE ch :: Word32 -> Word32 -> Word32 -> Word32 #-}
{-# SPECIALIZE ch :: Word64 -> Word64 -> Word64 -> Word64 #-}
ch :: Bits a => a -> a -> a -> a
ch :: forall a. Bits a => a -> a -> a -> a
ch a
x a
y a
z = (a
x a -> a -> a
forall a. Bits a => a -> a -> a
.&. a
y) a -> a -> a
forall a. Bits a => a -> a -> a
`xor` (a -> a
forall a. Bits a => a -> a
complement a
x a -> a -> a
forall a. Bits a => a -> a -> a
.&. a
z)
{-# SPECIALIZE maj :: Word32 -> Word32 -> Word32 -> Word32 #-}
{-# SPECIALIZE maj :: Word64 -> Word64 -> Word64 -> Word64 #-}
maj :: Bits a => a -> a -> a -> a
maj :: forall a. Bits a => a -> a -> a -> a
maj a
x a
y a
z = (a
x a -> a -> a
forall a. Bits a => a -> a -> a
.&. (a
y a -> a -> a
forall a. Bits a => a -> a -> a
.|. a
z)) a -> a -> a
forall a. Bits a => a -> a -> a
.|. (a
y a -> a -> a
forall a. Bits a => a -> a -> a
.&. a
z)
bsig256_0 :: Word32 -> Word32
bsig256_0 :: Word32 -> Word32
bsig256_0 Word32
x = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateR Word32
x Int
2 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateR Word32
x Int
13 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateR Word32
x Int
22
bsig256_1 :: Word32 -> Word32
bsig256_1 :: Word32 -> Word32
bsig256_1 Word32
x = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateR Word32
x Int
6 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateR Word32
x Int
11 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateR Word32
x Int
25
lsig256_0 :: Word32 -> Word32
lsig256_0 :: Word32 -> Word32
lsig256_0 Word32
x = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateR Word32
x Int
7 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateR Word32
x Int
18 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
shiftR Word32
x Int
3
lsig256_1 :: Word32 -> Word32
lsig256_1 :: Word32 -> Word32
lsig256_1 Word32
x = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateR Word32
x Int
17 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateR Word32
x Int
19 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
shiftR Word32
x Int
10
bsig512_0 :: Word64 -> Word64
bsig512_0 :: Word64 -> Word64
bsig512_0 Word64
x = Word64 -> Int -> Word64
forall a. Bits a => a -> Int -> a
rotateR Word64
x Int
28 Word64 -> Word64 -> Word64
forall a. Bits a => a -> a -> a
`xor` Word64 -> Int -> Word64
forall a. Bits a => a -> Int -> a
rotateR Word64
x Int
34 Word64 -> Word64 -> Word64
forall a. Bits a => a -> a -> a
`xor` Word64 -> Int -> Word64
forall a. Bits a => a -> Int -> a
rotateR Word64
x Int
39
bsig512_1 :: Word64 -> Word64
bsig512_1 :: Word64 -> Word64
bsig512_1 Word64
x = Word64 -> Int -> Word64
forall a. Bits a => a -> Int -> a
rotateR Word64
x Int
14 Word64 -> Word64 -> Word64
forall a. Bits a => a -> a -> a
`xor` Word64 -> Int -> Word64
forall a. Bits a => a -> Int -> a
rotateR Word64
x Int
18 Word64 -> Word64 -> Word64
forall a. Bits a => a -> a -> a
`xor` Word64 -> Int -> Word64
forall a. Bits a => a -> Int -> a
rotateR Word64
x Int
41
lsig512_0 :: Word64 -> Word64
lsig512_0 :: Word64 -> Word64
lsig512_0 Word64
x = Word64 -> Int -> Word64
forall a. Bits a => a -> Int -> a
rotateR Word64
x Int
1 Word64 -> Word64 -> Word64
forall a. Bits a => a -> a -> a
`xor` Word64 -> Int -> Word64
forall a. Bits a => a -> Int -> a
rotateR Word64
x Int
8 Word64 -> Word64 -> Word64
forall a. Bits a => a -> a -> a
`xor` Word64 -> Int -> Word64
forall a. Bits a => a -> Int -> a
shiftR Word64
x Int
7
lsig512_1 :: Word64 -> Word64
lsig512_1 :: Word64 -> Word64
lsig512_1 Word64
x = Word64 -> Int -> Word64
forall a. Bits a => a -> Int -> a
rotateR Word64
x Int
19 Word64 -> Word64 -> Word64
forall a. Bits a => a -> a -> a
`xor` Word64 -> Int -> Word64
forall a. Bits a => a -> Int -> a
rotateR Word64
x Int
61 Word64 -> Word64 -> Word64
forall a. Bits a => a -> a -> a
`xor` Word64 -> Int -> Word64
forall a. Bits a => a -> Int -> a
shiftR Word64
x Int
6
data SHA1Sched = SHA1Sched !Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
getSHA1Sched :: Get SHA1Sched
getSHA1Sched :: Get SHA1Sched
getSHA1Sched = do
Word32
w00 <- Get Word32
getWord32be
Word32
w01 <- Get Word32
getWord32be
Word32
w02 <- Get Word32
getWord32be
Word32
w03 <- Get Word32
getWord32be
Word32
w04 <- Get Word32
getWord32be
Word32
w05 <- Get Word32
getWord32be
Word32
w06 <- Get Word32
getWord32be
Word32
w07 <- Get Word32
getWord32be
Word32
w08 <- Get Word32
getWord32be
Word32
w09 <- Get Word32
getWord32be
Word32
w10 <- Get Word32
getWord32be
Word32
w11 <- Get Word32
getWord32be
Word32
w12 <- Get Word32
getWord32be
Word32
w13 <- Get Word32
getWord32be
Word32
w14 <- Get Word32
getWord32be
Word32
w15 <- Get Word32
getWord32be
let w16 :: Word32
w16 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w13 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w08 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w02 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w00) Int
1
w17 :: Word32
w17 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w14 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w09 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w03 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w01) Int
1
w18 :: Word32
w18 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w15 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w10 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w04 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w02) Int
1
w19 :: Word32
w19 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w16 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w11 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w05 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w03) Int
1
w20 :: Word32
w20 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w17 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w12 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w06 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w04) Int
1
w21 :: Word32
w21 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w18 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w13 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w07 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w05) Int
1
w22 :: Word32
w22 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w19 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w14 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w08 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w06) Int
1
w23 :: Word32
w23 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w20 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w15 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w09 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w07) Int
1
w24 :: Word32
w24 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w21 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w16 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w10 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w08) Int
1
w25 :: Word32
w25 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w22 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w17 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w11 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w09) Int
1
w26 :: Word32
w26 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w23 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w18 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w12 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w10) Int
1
w27 :: Word32
w27 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w24 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w19 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w13 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w11) Int
1
w28 :: Word32
w28 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w25 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w20 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w14 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w12) Int
1
w29 :: Word32
w29 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w26 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w21 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w15 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w13) Int
1
w30 :: Word32
w30 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w27 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w22 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w16 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w14) Int
1
w31 :: Word32
w31 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w28 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w23 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w17 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w15) Int
1
w32 :: Word32
w32 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w29 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w24 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w18 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w16) Int
1
w33 :: Word32
w33 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w30 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w25 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w19 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w17) Int
1
w34 :: Word32
w34 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w31 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w26 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w20 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w18) Int
1
w35 :: Word32
w35 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w32 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w27 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w21 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w19) Int
1
w36 :: Word32
w36 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w33 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w28 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w22 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w20) Int
1
w37 :: Word32
w37 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w34 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w29 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w23 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w21) Int
1
w38 :: Word32
w38 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w35 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w30 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w24 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w22) Int
1
w39 :: Word32
w39 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w36 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w31 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w25 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w23) Int
1
w40 :: Word32
w40 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w37 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w32 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w26 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w24) Int
1
w41 :: Word32
w41 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w38 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w33 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w27 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w25) Int
1
w42 :: Word32
w42 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w39 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w34 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w28 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w26) Int
1
w43 :: Word32
w43 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w40 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w35 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w29 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w27) Int
1
w44 :: Word32
w44 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w41 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w36 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w30 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w28) Int
1
w45 :: Word32
w45 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w42 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w37 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w31 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w29) Int
1
w46 :: Word32
w46 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w43 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w38 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w32 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w30) Int
1
w47 :: Word32
w47 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w44 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w39 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w33 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w31) Int
1
w48 :: Word32
w48 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w45 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w40 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w34 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w32) Int
1
w49 :: Word32
w49 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w46 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w41 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w35 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w33) Int
1
w50 :: Word32
w50 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w47 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w42 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w36 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w34) Int
1
w51 :: Word32
w51 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w48 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w43 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w37 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w35) Int
1
w52 :: Word32
w52 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w49 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w44 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w38 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w36) Int
1
w53 :: Word32
w53 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w50 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w45 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w39 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w37) Int
1
w54 :: Word32
w54 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w51 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w46 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w40 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w38) Int
1
w55 :: Word32
w55 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w52 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w47 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w41 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w39) Int
1
w56 :: Word32
w56 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w53 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w48 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w42 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w40) Int
1
w57 :: Word32
w57 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w54 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w49 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w43 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w41) Int
1
w58 :: Word32
w58 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w55 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w50 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w44 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w42) Int
1
w59 :: Word32
w59 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w56 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w51 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w45 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w43) Int
1
w60 :: Word32
w60 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w57 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w52 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w46 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w44) Int
1
w61 :: Word32
w61 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w58 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w53 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w47 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w45) Int
1
w62 :: Word32
w62 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w59 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w54 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w48 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w46) Int
1
w63 :: Word32
w63 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w60 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w55 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w49 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w47) Int
1
w64 :: Word32
w64 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w61 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w56 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w50 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w48) Int
1
w65 :: Word32
w65 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w62 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w57 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w51 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w49) Int
1
w66 :: Word32
w66 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w63 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w58 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w52 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w50) Int
1
w67 :: Word32
w67 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w64 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w59 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w53 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w51) Int
1
w68 :: Word32
w68 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w65 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w60 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w54 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w52) Int
1
w69 :: Word32
w69 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w66 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w61 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w55 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w53) Int
1
w70 :: Word32
w70 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w67 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w62 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w56 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w54) Int
1
w71 :: Word32
w71 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w68 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w63 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w57 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w55) Int
1
w72 :: Word32
w72 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w69 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w64 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w58 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w56) Int
1
w73 :: Word32
w73 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w70 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w65 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w59 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w57) Int
1
w74 :: Word32
w74 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w71 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w66 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w60 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w58) Int
1
w75 :: Word32
w75 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w72 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w67 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w61 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w59) Int
1
w76 :: Word32
w76 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w73 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w68 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w62 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w60) Int
1
w77 :: Word32
w77 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w74 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w69 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w63 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w61) Int
1
w78 :: Word32
w78 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w75 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w70 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w64 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w62) Int
1
w79 :: Word32
w79 = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL (Word32
w76 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w71 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w65 Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
w63) Int
1
SHA1Sched -> Get SHA1Sched
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (SHA1Sched -> Get SHA1Sched) -> SHA1Sched -> Get SHA1Sched
forall a b. (a -> b) -> a -> b
$! Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> SHA1Sched
SHA1Sched Word32
w00 Word32
w01 Word32
w02 Word32
w03 Word32
w04 Word32
w05 Word32
w06 Word32
w07 Word32
w08 Word32
w09
Word32
w10 Word32
w11 Word32
w12 Word32
w13 Word32
w14 Word32
w15 Word32
w16 Word32
w17 Word32
w18 Word32
w19
Word32
w20 Word32
w21 Word32
w22 Word32
w23 Word32
w24 Word32
w25 Word32
w26 Word32
w27 Word32
w28 Word32
w29
Word32
w30 Word32
w31 Word32
w32 Word32
w33 Word32
w34 Word32
w35 Word32
w36 Word32
w37 Word32
w38 Word32
w39
Word32
w40 Word32
w41 Word32
w42 Word32
w43 Word32
w44 Word32
w45 Word32
w46 Word32
w47 Word32
w48 Word32
w49
Word32
w50 Word32
w51 Word32
w52 Word32
w53 Word32
w54 Word32
w55 Word32
w56 Word32
w57 Word32
w58 Word32
w59
Word32
w60 Word32
w61 Word32
w62 Word32
w63 Word32
w64 Word32
w65 Word32
w66 Word32
w67 Word32
w68 Word32
w69
Word32
w70 Word32
w71 Word32
w72 Word32
w73 Word32
w74 Word32
w75 Word32
w76 Word32
w77 Word32
w78 Word32
w79
data SHA256Sched = SHA256Sched !Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32 !Word32
!Word32 !Word32 !Word32 !Word32
getSHA256Sched :: Get SHA256Sched
getSHA256Sched :: Get SHA256Sched
getSHA256Sched = do
Word32
w00 <- Get Word32
getWord32be
Word32
w01 <- Get Word32
getWord32be
Word32
w02 <- Get Word32
getWord32be
Word32
w03 <- Get Word32
getWord32be
Word32
w04 <- Get Word32
getWord32be
Word32
w05 <- Get Word32
getWord32be
Word32
w06 <- Get Word32
getWord32be
Word32
w07 <- Get Word32
getWord32be
Word32
w08 <- Get Word32
getWord32be
Word32
w09 <- Get Word32
getWord32be
Word32
w10 <- Get Word32
getWord32be
Word32
w11 <- Get Word32
getWord32be
Word32
w12 <- Get Word32
getWord32be
Word32
w13 <- Get Word32
getWord32be
Word32
w14 <- Get Word32
getWord32be
Word32
w15 <- Get Word32
getWord32be
let w16 :: Word32
w16 = Word32 -> Word32
lsig256_1 Word32
w14 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w09 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w01 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w00
w17 :: Word32
w17 = Word32 -> Word32
lsig256_1 Word32
w15 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w10 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w02 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w01
w18 :: Word32
w18 = Word32 -> Word32
lsig256_1 Word32
w16 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w11 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w03 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w02
w19 :: Word32
w19 = Word32 -> Word32
lsig256_1 Word32
w17 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w12 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w04 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w03
w20 :: Word32
w20 = Word32 -> Word32
lsig256_1 Word32
w18 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w13 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w05 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w04
w21 :: Word32
w21 = Word32 -> Word32
lsig256_1 Word32
w19 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w14 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w06 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w05
w22 :: Word32
w22 = Word32 -> Word32
lsig256_1 Word32
w20 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w15 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w07 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w06
w23 :: Word32
w23 = Word32 -> Word32
lsig256_1 Word32
w21 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w16 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w08 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w07
w24 :: Word32
w24 = Word32 -> Word32
lsig256_1 Word32
w22 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w17 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w09 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w08
w25 :: Word32
w25 = Word32 -> Word32
lsig256_1 Word32
w23 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w18 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w10 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w09
w26 :: Word32
w26 = Word32 -> Word32
lsig256_1 Word32
w24 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w19 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w11 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w10
w27 :: Word32
w27 = Word32 -> Word32
lsig256_1 Word32
w25 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w20 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w12 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w11
w28 :: Word32
w28 = Word32 -> Word32
lsig256_1 Word32
w26 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w21 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w13 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w12
w29 :: Word32
w29 = Word32 -> Word32
lsig256_1 Word32
w27 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w22 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w14 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w13
w30 :: Word32
w30 = Word32 -> Word32
lsig256_1 Word32
w28 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w23 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w15 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w14
w31 :: Word32
w31 = Word32 -> Word32
lsig256_1 Word32
w29 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w24 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w16 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w15
w32 :: Word32
w32 = Word32 -> Word32
lsig256_1 Word32
w30 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w25 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w17 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w16
w33 :: Word32
w33 = Word32 -> Word32
lsig256_1 Word32
w31 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w26 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w18 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w17
w34 :: Word32
w34 = Word32 -> Word32
lsig256_1 Word32
w32 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w27 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w19 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w18
w35 :: Word32
w35 = Word32 -> Word32
lsig256_1 Word32
w33 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w28 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w20 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w19
w36 :: Word32
w36 = Word32 -> Word32
lsig256_1 Word32
w34 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w29 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w21 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w20
w37 :: Word32
w37 = Word32 -> Word32
lsig256_1 Word32
w35 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w30 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w22 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w21
w38 :: Word32
w38 = Word32 -> Word32
lsig256_1 Word32
w36 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w31 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w23 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w22
w39 :: Word32
w39 = Word32 -> Word32
lsig256_1 Word32
w37 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w32 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w24 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w23
w40 :: Word32
w40 = Word32 -> Word32
lsig256_1 Word32
w38 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w33 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w25 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w24
w41 :: Word32
w41 = Word32 -> Word32
lsig256_1 Word32
w39 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w34 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w26 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w25
w42 :: Word32
w42 = Word32 -> Word32
lsig256_1 Word32
w40 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w35 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w27 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w26
w43 :: Word32
w43 = Word32 -> Word32
lsig256_1 Word32
w41 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w36 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w28 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w27
w44 :: Word32
w44 = Word32 -> Word32
lsig256_1 Word32
w42 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w37 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w29 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w28
w45 :: Word32
w45 = Word32 -> Word32
lsig256_1 Word32
w43 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w38 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w30 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w29
w46 :: Word32
w46 = Word32 -> Word32
lsig256_1 Word32
w44 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w39 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w31 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w30
w47 :: Word32
w47 = Word32 -> Word32
lsig256_1 Word32
w45 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w40 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w32 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w31
w48 :: Word32
w48 = Word32 -> Word32
lsig256_1 Word32
w46 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w41 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w33 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w32
w49 :: Word32
w49 = Word32 -> Word32
lsig256_1 Word32
w47 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w42 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w34 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w33
w50 :: Word32
w50 = Word32 -> Word32
lsig256_1 Word32
w48 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w43 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w35 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w34
w51 :: Word32
w51 = Word32 -> Word32
lsig256_1 Word32
w49 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w44 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w36 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w35
w52 :: Word32
w52 = Word32 -> Word32
lsig256_1 Word32
w50 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w45 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w37 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w36
w53 :: Word32
w53 = Word32 -> Word32
lsig256_1 Word32
w51 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w46 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w38 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w37
w54 :: Word32
w54 = Word32 -> Word32
lsig256_1 Word32
w52 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w47 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w39 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w38
w55 :: Word32
w55 = Word32 -> Word32
lsig256_1 Word32
w53 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w48 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w40 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w39
w56 :: Word32
w56 = Word32 -> Word32
lsig256_1 Word32
w54 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w49 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w41 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w40
w57 :: Word32
w57 = Word32 -> Word32
lsig256_1 Word32
w55 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w50 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w42 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w41
w58 :: Word32
w58 = Word32 -> Word32
lsig256_1 Word32
w56 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w51 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w43 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w42
w59 :: Word32
w59 = Word32 -> Word32
lsig256_1 Word32
w57 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w52 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w44 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w43
w60 :: Word32
w60 = Word32 -> Word32
lsig256_1 Word32
w58 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w53 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w45 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w44
w61 :: Word32
w61 = Word32 -> Word32
lsig256_1 Word32
w59 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w54 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w46 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w45
w62 :: Word32
w62 = Word32 -> Word32
lsig256_1 Word32
w60 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w55 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w47 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w46
w63 :: Word32
w63 = Word32 -> Word32
lsig256_1 Word32
w61 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w56 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
lsig256_0 Word32
w48 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w47
SHA256Sched -> Get SHA256Sched
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (SHA256Sched -> Get SHA256Sched) -> SHA256Sched -> Get SHA256Sched
forall a b. (a -> b) -> a -> b
$! Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> SHA256Sched
SHA256Sched Word32
w00 Word32
w01 Word32
w02 Word32
w03 Word32
w04 Word32
w05 Word32
w06 Word32
w07 Word32
w08 Word32
w09
Word32
w10 Word32
w11 Word32
w12 Word32
w13 Word32
w14 Word32
w15 Word32
w16 Word32
w17 Word32
w18 Word32
w19
Word32
w20 Word32
w21 Word32
w22 Word32
w23 Word32
w24 Word32
w25 Word32
w26 Word32
w27 Word32
w28 Word32
w29
Word32
w30 Word32
w31 Word32
w32 Word32
w33 Word32
w34 Word32
w35 Word32
w36 Word32
w37 Word32
w38 Word32
w39
Word32
w40 Word32
w41 Word32
w42 Word32
w43 Word32
w44 Word32
w45 Word32
w46 Word32
w47 Word32
w48 Word32
w49
Word32
w50 Word32
w51 Word32
w52 Word32
w53 Word32
w54 Word32
w55 Word32
w56 Word32
w57 Word32
w58 Word32
w59
Word32
w60 Word32
w61 Word32
w62 Word32
w63
data SHA512Sched = SHA512Sched !Word64 !Word64 !Word64 !Word64 !Word64
!Word64 !Word64 !Word64 !Word64 !Word64
!Word64 !Word64 !Word64 !Word64 !Word64
!Word64 !Word64 !Word64 !Word64 !Word64
!Word64 !Word64 !Word64 !Word64 !Word64
!Word64 !Word64 !Word64 !Word64 !Word64
!Word64 !Word64 !Word64 !Word64 !Word64
!Word64 !Word64 !Word64 !Word64 !Word64
!Word64 !Word64 !Word64 !Word64 !Word64
!Word64 !Word64 !Word64 !Word64 !Word64
!Word64 !Word64 !Word64 !Word64 !Word64
!Word64 !Word64 !Word64 !Word64 !Word64
!Word64 !Word64 !Word64 !Word64 !Word64
!Word64 !Word64 !Word64 !Word64 !Word64
!Word64 !Word64 !Word64 !Word64 !Word64
!Word64 !Word64 !Word64 !Word64 !Word64
getSHA512Sched :: Get SHA512Sched
getSHA512Sched :: Get SHA512Sched
getSHA512Sched = do
Word64
w00 <- Get Word64
getWord64be
Word64
w01 <- Get Word64
getWord64be
Word64
w02 <- Get Word64
getWord64be
Word64
w03 <- Get Word64
getWord64be
Word64
w04 <- Get Word64
getWord64be
Word64
w05 <- Get Word64
getWord64be
Word64
w06 <- Get Word64
getWord64be
Word64
w07 <- Get Word64
getWord64be
Word64
w08 <- Get Word64
getWord64be
Word64
w09 <- Get Word64
getWord64be
Word64
w10 <- Get Word64
getWord64be
Word64
w11 <- Get Word64
getWord64be
Word64
w12 <- Get Word64
getWord64be
Word64
w13 <- Get Word64
getWord64be
Word64
w14 <- Get Word64
getWord64be
Word64
w15 <- Get Word64
getWord64be
let w16 :: Word64
w16 = Word64 -> Word64
lsig512_1 Word64
w14 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w09 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w01 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w00
w17 :: Word64
w17 = Word64 -> Word64
lsig512_1 Word64
w15 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w10 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w02 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w01
w18 :: Word64
w18 = Word64 -> Word64
lsig512_1 Word64
w16 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w11 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w03 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w02
w19 :: Word64
w19 = Word64 -> Word64
lsig512_1 Word64
w17 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w12 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w04 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w03
w20 :: Word64
w20 = Word64 -> Word64
lsig512_1 Word64
w18 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w13 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w05 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w04
w21 :: Word64
w21 = Word64 -> Word64
lsig512_1 Word64
w19 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w14 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w06 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w05
w22 :: Word64
w22 = Word64 -> Word64
lsig512_1 Word64
w20 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w15 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w07 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w06
w23 :: Word64
w23 = Word64 -> Word64
lsig512_1 Word64
w21 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w16 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w08 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w07
w24 :: Word64
w24 = Word64 -> Word64
lsig512_1 Word64
w22 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w17 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w09 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w08
w25 :: Word64
w25 = Word64 -> Word64
lsig512_1 Word64
w23 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w18 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w10 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w09
w26 :: Word64
w26 = Word64 -> Word64
lsig512_1 Word64
w24 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w19 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w11 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w10
w27 :: Word64
w27 = Word64 -> Word64
lsig512_1 Word64
w25 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w20 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w12 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w11
w28 :: Word64
w28 = Word64 -> Word64
lsig512_1 Word64
w26 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w21 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w13 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w12
w29 :: Word64
w29 = Word64 -> Word64
lsig512_1 Word64
w27 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w22 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w14 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w13
w30 :: Word64
w30 = Word64 -> Word64
lsig512_1 Word64
w28 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w23 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w15 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w14
w31 :: Word64
w31 = Word64 -> Word64
lsig512_1 Word64
w29 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w24 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w16 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w15
w32 :: Word64
w32 = Word64 -> Word64
lsig512_1 Word64
w30 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w25 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w17 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w16
w33 :: Word64
w33 = Word64 -> Word64
lsig512_1 Word64
w31 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w26 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w18 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w17
w34 :: Word64
w34 = Word64 -> Word64
lsig512_1 Word64
w32 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w27 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w19 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w18
w35 :: Word64
w35 = Word64 -> Word64
lsig512_1 Word64
w33 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w28 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w20 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w19
w36 :: Word64
w36 = Word64 -> Word64
lsig512_1 Word64
w34 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w29 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w21 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w20
w37 :: Word64
w37 = Word64 -> Word64
lsig512_1 Word64
w35 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w30 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w22 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w21
w38 :: Word64
w38 = Word64 -> Word64
lsig512_1 Word64
w36 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w31 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w23 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w22
w39 :: Word64
w39 = Word64 -> Word64
lsig512_1 Word64
w37 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w32 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w24 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w23
w40 :: Word64
w40 = Word64 -> Word64
lsig512_1 Word64
w38 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w33 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w25 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w24
w41 :: Word64
w41 = Word64 -> Word64
lsig512_1 Word64
w39 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w34 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w26 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w25
w42 :: Word64
w42 = Word64 -> Word64
lsig512_1 Word64
w40 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w35 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w27 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w26
w43 :: Word64
w43 = Word64 -> Word64
lsig512_1 Word64
w41 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w36 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w28 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w27
w44 :: Word64
w44 = Word64 -> Word64
lsig512_1 Word64
w42 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w37 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w29 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w28
w45 :: Word64
w45 = Word64 -> Word64
lsig512_1 Word64
w43 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w38 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w30 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w29
w46 :: Word64
w46 = Word64 -> Word64
lsig512_1 Word64
w44 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w39 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w31 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w30
w47 :: Word64
w47 = Word64 -> Word64
lsig512_1 Word64
w45 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w40 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w32 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w31
w48 :: Word64
w48 = Word64 -> Word64
lsig512_1 Word64
w46 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w41 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w33 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w32
w49 :: Word64
w49 = Word64 -> Word64
lsig512_1 Word64
w47 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w42 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w34 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w33
w50 :: Word64
w50 = Word64 -> Word64
lsig512_1 Word64
w48 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w43 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w35 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w34
w51 :: Word64
w51 = Word64 -> Word64
lsig512_1 Word64
w49 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w44 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w36 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w35
w52 :: Word64
w52 = Word64 -> Word64
lsig512_1 Word64
w50 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w45 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w37 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w36
w53 :: Word64
w53 = Word64 -> Word64
lsig512_1 Word64
w51 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w46 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w38 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w37
w54 :: Word64
w54 = Word64 -> Word64
lsig512_1 Word64
w52 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w47 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w39 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w38
w55 :: Word64
w55 = Word64 -> Word64
lsig512_1 Word64
w53 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w48 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w40 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w39
w56 :: Word64
w56 = Word64 -> Word64
lsig512_1 Word64
w54 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w49 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w41 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w40
w57 :: Word64
w57 = Word64 -> Word64
lsig512_1 Word64
w55 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w50 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w42 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w41
w58 :: Word64
w58 = Word64 -> Word64
lsig512_1 Word64
w56 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w51 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w43 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w42
w59 :: Word64
w59 = Word64 -> Word64
lsig512_1 Word64
w57 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w52 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w44 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w43
w60 :: Word64
w60 = Word64 -> Word64
lsig512_1 Word64
w58 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w53 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w45 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w44
w61 :: Word64
w61 = Word64 -> Word64
lsig512_1 Word64
w59 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w54 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w46 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w45
w62 :: Word64
w62 = Word64 -> Word64
lsig512_1 Word64
w60 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w55 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w47 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w46
w63 :: Word64
w63 = Word64 -> Word64
lsig512_1 Word64
w61 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w56 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w48 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w47
w64 :: Word64
w64 = Word64 -> Word64
lsig512_1 Word64
w62 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w57 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w49 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w48
w65 :: Word64
w65 = Word64 -> Word64
lsig512_1 Word64
w63 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w58 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w50 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w49
w66 :: Word64
w66 = Word64 -> Word64
lsig512_1 Word64
w64 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w59 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w51 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w50
w67 :: Word64
w67 = Word64 -> Word64
lsig512_1 Word64
w65 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w60 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w52 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w51
w68 :: Word64
w68 = Word64 -> Word64
lsig512_1 Word64
w66 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w61 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w53 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w52
w69 :: Word64
w69 = Word64 -> Word64
lsig512_1 Word64
w67 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w62 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w54 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w53
w70 :: Word64
w70 = Word64 -> Word64
lsig512_1 Word64
w68 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w63 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w55 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w54
w71 :: Word64
w71 = Word64 -> Word64
lsig512_1 Word64
w69 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w64 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w56 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w55
w72 :: Word64
w72 = Word64 -> Word64
lsig512_1 Word64
w70 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w65 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w57 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w56
w73 :: Word64
w73 = Word64 -> Word64
lsig512_1 Word64
w71 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w66 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w58 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w57
w74 :: Word64
w74 = Word64 -> Word64
lsig512_1 Word64
w72 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w67 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w59 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w58
w75 :: Word64
w75 = Word64 -> Word64
lsig512_1 Word64
w73 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w68 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w60 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w59
w76 :: Word64
w76 = Word64 -> Word64
lsig512_1 Word64
w74 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w69 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w61 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w60
w77 :: Word64
w77 = Word64 -> Word64
lsig512_1 Word64
w75 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w70 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w62 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w61
w78 :: Word64
w78 = Word64 -> Word64
lsig512_1 Word64
w76 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w71 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w63 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w62
w79 :: Word64
w79 = Word64 -> Word64
lsig512_1 Word64
w77 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w72 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
lsig512_0 Word64
w64 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w63
SHA512Sched -> Get SHA512Sched
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (SHA512Sched -> Get SHA512Sched) -> SHA512Sched -> Get SHA512Sched
forall a b. (a -> b) -> a -> b
$! Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> SHA512Sched
SHA512Sched Word64
w00 Word64
w01 Word64
w02 Word64
w03 Word64
w04 Word64
w05 Word64
w06 Word64
w07 Word64
w08 Word64
w09
Word64
w10 Word64
w11 Word64
w12 Word64
w13 Word64
w14 Word64
w15 Word64
w16 Word64
w17 Word64
w18 Word64
w19
Word64
w20 Word64
w21 Word64
w22 Word64
w23 Word64
w24 Word64
w25 Word64
w26 Word64
w27 Word64
w28 Word64
w29
Word64
w30 Word64
w31 Word64
w32 Word64
w33 Word64
w34 Word64
w35 Word64
w36 Word64
w37 Word64
w38 Word64
w39
Word64
w40 Word64
w41 Word64
w42 Word64
w43 Word64
w44 Word64
w45 Word64
w46 Word64
w47 Word64
w48 Word64
w49
Word64
w50 Word64
w51 Word64
w52 Word64
w53 Word64
w54 Word64
w55 Word64
w56 Word64
w57 Word64
w58 Word64
w59
Word64
w60 Word64
w61 Word64
w62 Word64
w63 Word64
w64 Word64
w65 Word64
w66 Word64
w67 Word64
w68 Word64
w69
Word64
w70 Word64
w71 Word64
w72 Word64
w73 Word64
w74 Word64
w75 Word64
w76 Word64
w77 Word64
w78 Word64
w79
processSHA1Block :: SHA1State -> Get SHA1State
processSHA1Block :: SHA1State -> Get SHA1State
processSHA1Block s00 :: SHA1State
s00@(SHA1S Word32
a00 Word32
b00 Word32
c00 Word32
d00 Word32
e00) = do
(SHA1Sched Word32
w00 Word32
w01 Word32
w02 Word32
w03 Word32
w04 Word32
w05 Word32
w06 Word32
w07 Word32
w08 Word32
w09
Word32
w10 Word32
w11 Word32
w12 Word32
w13 Word32
w14 Word32
w15 Word32
w16 Word32
w17 Word32
w18 Word32
w19
Word32
w20 Word32
w21 Word32
w22 Word32
w23 Word32
w24 Word32
w25 Word32
w26 Word32
w27 Word32
w28 Word32
w29
Word32
w30 Word32
w31 Word32
w32 Word32
w33 Word32
w34 Word32
w35 Word32
w36 Word32
w37 Word32
w38 Word32
w39
Word32
w40 Word32
w41 Word32
w42 Word32
w43 Word32
w44 Word32
w45 Word32
w46 Word32
w47 Word32
w48 Word32
w49
Word32
w50 Word32
w51 Word32
w52 Word32
w53 Word32
w54 Word32
w55 Word32
w56 Word32
w57 Word32
w58 Word32
w59
Word32
w60 Word32
w61 Word32
w62 Word32
w63 Word32
w64 Word32
w65 Word32
w66 Word32
w67 Word32
w68 Word32
w69
Word32
w70 Word32
w71 Word32
w72 Word32
w73 Word32
w74 Word32
w75 Word32
w76 Word32
w77 Word32
w78 Word32
w79) <- Get SHA1Sched
getSHA1Sched
let s01 :: SHA1State
s01 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s00 Word32
0x5a827999 Word32
w00
s02 :: SHA1State
s02 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s01 Word32
0x5a827999 Word32
w01
s03 :: SHA1State
s03 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s02 Word32
0x5a827999 Word32
w02
s04 :: SHA1State
s04 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s03 Word32
0x5a827999 Word32
w03
s05 :: SHA1State
s05 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s04 Word32
0x5a827999 Word32
w04
s06 :: SHA1State
s06 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s05 Word32
0x5a827999 Word32
w05
s07 :: SHA1State
s07 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s06 Word32
0x5a827999 Word32
w06
s08 :: SHA1State
s08 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s07 Word32
0x5a827999 Word32
w07
s09 :: SHA1State
s09 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s08 Word32
0x5a827999 Word32
w08
s10 :: SHA1State
s10 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s09 Word32
0x5a827999 Word32
w09
s11 :: SHA1State
s11 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s10 Word32
0x5a827999 Word32
w10
s12 :: SHA1State
s12 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s11 Word32
0x5a827999 Word32
w11
s13 :: SHA1State
s13 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s12 Word32
0x5a827999 Word32
w12
s14 :: SHA1State
s14 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s13 Word32
0x5a827999 Word32
w13
s15 :: SHA1State
s15 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s14 Word32
0x5a827999 Word32
w14
s16 :: SHA1State
s16 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s15 Word32
0x5a827999 Word32
w15
s17 :: SHA1State
s17 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s16 Word32
0x5a827999 Word32
w16
s18 :: SHA1State
s18 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s17 Word32
0x5a827999 Word32
w17
s19 :: SHA1State
s19 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s18 Word32
0x5a827999 Word32
w18
s20 :: SHA1State
s20 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch SHA1State
s19 Word32
0x5a827999 Word32
w19
s21 :: SHA1State
s21 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s20 Word32
0x6ed9eba1 Word32
w20
s22 :: SHA1State
s22 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s21 Word32
0x6ed9eba1 Word32
w21
s23 :: SHA1State
s23 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s22 Word32
0x6ed9eba1 Word32
w22
s24 :: SHA1State
s24 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s23 Word32
0x6ed9eba1 Word32
w23
s25 :: SHA1State
s25 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s24 Word32
0x6ed9eba1 Word32
w24
s26 :: SHA1State
s26 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s25 Word32
0x6ed9eba1 Word32
w25
s27 :: SHA1State
s27 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s26 Word32
0x6ed9eba1 Word32
w26
s28 :: SHA1State
s28 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s27 Word32
0x6ed9eba1 Word32
w27
s29 :: SHA1State
s29 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s28 Word32
0x6ed9eba1 Word32
w28
s30 :: SHA1State
s30 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s29 Word32
0x6ed9eba1 Word32
w29
s31 :: SHA1State
s31 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s30 Word32
0x6ed9eba1 Word32
w30
s32 :: SHA1State
s32 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s31 Word32
0x6ed9eba1 Word32
w31
s33 :: SHA1State
s33 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s32 Word32
0x6ed9eba1 Word32
w32
s34 :: SHA1State
s34 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s33 Word32
0x6ed9eba1 Word32
w33
s35 :: SHA1State
s35 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s34 Word32
0x6ed9eba1 Word32
w34
s36 :: SHA1State
s36 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s35 Word32
0x6ed9eba1 Word32
w35
s37 :: SHA1State
s37 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s36 Word32
0x6ed9eba1 Word32
w36
s38 :: SHA1State
s38 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s37 Word32
0x6ed9eba1 Word32
w37
s39 :: SHA1State
s39 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s38 Word32
0x6ed9eba1 Word32
w38
s40 :: SHA1State
s40 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s39 Word32
0x6ed9eba1 Word32
w39
s41 :: SHA1State
s41 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s40 Word32
0x8f1bbcdc Word32
w40
s42 :: SHA1State
s42 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s41 Word32
0x8f1bbcdc Word32
w41
s43 :: SHA1State
s43 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s42 Word32
0x8f1bbcdc Word32
w42
s44 :: SHA1State
s44 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s43 Word32
0x8f1bbcdc Word32
w43
s45 :: SHA1State
s45 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s44 Word32
0x8f1bbcdc Word32
w44
s46 :: SHA1State
s46 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s45 Word32
0x8f1bbcdc Word32
w45
s47 :: SHA1State
s47 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s46 Word32
0x8f1bbcdc Word32
w46
s48 :: SHA1State
s48 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s47 Word32
0x8f1bbcdc Word32
w47
s49 :: SHA1State
s49 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s48 Word32
0x8f1bbcdc Word32
w48
s50 :: SHA1State
s50 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s49 Word32
0x8f1bbcdc Word32
w49
s51 :: SHA1State
s51 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s50 Word32
0x8f1bbcdc Word32
w50
s52 :: SHA1State
s52 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s51 Word32
0x8f1bbcdc Word32
w51
s53 :: SHA1State
s53 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s52 Word32
0x8f1bbcdc Word32
w52
s54 :: SHA1State
s54 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s53 Word32
0x8f1bbcdc Word32
w53
s55 :: SHA1State
s55 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s54 Word32
0x8f1bbcdc Word32
w54
s56 :: SHA1State
s56 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s55 Word32
0x8f1bbcdc Word32
w55
s57 :: SHA1State
s57 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s56 Word32
0x8f1bbcdc Word32
w56
s58 :: SHA1State
s58 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s57 Word32
0x8f1bbcdc Word32
w57
s59 :: SHA1State
s59 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s58 Word32
0x8f1bbcdc Word32
w58
s60 :: SHA1State
s60 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj SHA1State
s59 Word32
0x8f1bbcdc Word32
w59
s61 :: SHA1State
s61 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s60 Word32
0xca62c1d6 Word32
w60
s62 :: SHA1State
s62 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s61 Word32
0xca62c1d6 Word32
w61
s63 :: SHA1State
s63 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s62 Word32
0xca62c1d6 Word32
w62
s64 :: SHA1State
s64 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s63 Word32
0xca62c1d6 Word32
w63
s65 :: SHA1State
s65 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s64 Word32
0xca62c1d6 Word32
w64
s66 :: SHA1State
s66 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s65 Word32
0xca62c1d6 Word32
w65
s67 :: SHA1State
s67 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s66 Word32
0xca62c1d6 Word32
w66
s68 :: SHA1State
s68 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s67 Word32
0xca62c1d6 Word32
w67
s69 :: SHA1State
s69 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s68 Word32
0xca62c1d6 Word32
w68
s70 :: SHA1State
s70 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s69 Word32
0xca62c1d6 Word32
w69
s71 :: SHA1State
s71 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s70 Word32
0xca62c1d6 Word32
w70
s72 :: SHA1State
s72 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s71 Word32
0xca62c1d6 Word32
w71
s73 :: SHA1State
s73 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s72 Word32
0xca62c1d6 Word32
w72
s74 :: SHA1State
s74 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s73 Word32
0xca62c1d6 Word32
w73
s75 :: SHA1State
s75 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s74 Word32
0xca62c1d6 Word32
w74
s76 :: SHA1State
s76 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s75 Word32
0xca62c1d6 Word32
w75
s77 :: SHA1State
s77 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s76 Word32
0xca62c1d6 Word32
w76
s78 :: SHA1State
s78 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s77 Word32
0xca62c1d6 Word32
w77
s79 :: SHA1State
s79 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s78 Word32
0xca62c1d6 Word32
w78
s80 :: SHA1State
s80 = SHA1State -> Word32 -> Word32 -> SHA1State
step1_par SHA1State
s79 Word32
0xca62c1d6 Word32
w79
SHA1S Word32
a80 Word32
b80 Word32
c80 Word32
d80 Word32
e80 = SHA1State
s80
SHA1State -> Get SHA1State
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (SHA1State -> Get SHA1State) -> SHA1State -> Get SHA1State
forall a b. (a -> b) -> a -> b
$! Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> SHA1State
SHA1S (Word32
a00 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
a80) (Word32
b00 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
b80) (Word32
c00 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
c80) (Word32
d00 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
d80) (Word32
e00 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
e80)
{-# INLINE step1_ch #-}
step1_ch :: SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch :: SHA1State -> Word32 -> Word32 -> SHA1State
step1_ch !(SHA1S Word32
a Word32
b Word32
c Word32
d Word32
e) Word32
k Word32
w = Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> SHA1State
SHA1S Word32
a' Word32
b' Word32
c' Word32
d' Word32
e'
where a' :: Word32
a' = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL Word32
a Int
5 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ ((Word32
b Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
.&. Word32
c) Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` (Word32 -> Word32
forall a. Bits a => a -> a
complement Word32
b Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
.&. Word32
d)) Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
e Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
k Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w
b' :: Word32
b' = Word32
a
c' :: Word32
c' = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL Word32
b Int
30
d' :: Word32
d' = Word32
c
e' :: Word32
e' = Word32
d
{-# INLINE step1_par #-}
step1_par :: SHA1State -> Word32 -> Word32 -> SHA1State
step1_par :: SHA1State -> Word32 -> Word32 -> SHA1State
step1_par !(SHA1S Word32
a Word32
b Word32
c Word32
d Word32
e) Word32
k Word32
w = Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> SHA1State
SHA1S Word32
a' Word32
b' Word32
c' Word32
d' Word32
e'
where a' :: Word32
a' = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL Word32
a Int
5 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ (Word32
b Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
c Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
`xor` Word32
d) Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
e Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
k Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w
b' :: Word32
b' = Word32
a
c' :: Word32
c' = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL Word32
b Int
30
d' :: Word32
d' = Word32
c
e' :: Word32
e' = Word32
d
{-# INLINE step1_maj #-}
step1_maj :: SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj :: SHA1State -> Word32 -> Word32 -> SHA1State
step1_maj !(SHA1S Word32
a Word32
b Word32
c Word32
d Word32
e) Word32
k Word32
w = Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> SHA1State
SHA1S Word32
a' Word32
b' Word32
c' Word32
d' Word32
e'
where a' :: Word32
a' = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL Word32
a Int
5 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ ((Word32
b Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
.&. (Word32
c Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
.|. Word32
d)) Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
.|. (Word32
c Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a
.&. Word32
d)) Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
e Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
k Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w
b' :: Word32
b' = Word32
a
c' :: Word32
c' = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
rotateL Word32
b Int
30
d' :: Word32
d' = Word32
c
e' :: Word32
e' = Word32
d
processSHA256Block :: SHA256State -> Get SHA256State
processSHA256Block :: SHA256State -> Get SHA256State
processSHA256Block !s00 :: SHA256State
s00@(SHA256S Word32
a00 Word32
b00 Word32
c00 Word32
d00 Word32
e00 Word32
f00 Word32
g00 Word32
h00) = do
(SHA256Sched Word32
w00 Word32
w01 Word32
w02 Word32
w03 Word32
w04 Word32
w05 Word32
w06 Word32
w07 Word32
w08 Word32
w09
Word32
w10 Word32
w11 Word32
w12 Word32
w13 Word32
w14 Word32
w15 Word32
w16 Word32
w17 Word32
w18 Word32
w19
Word32
w20 Word32
w21 Word32
w22 Word32
w23 Word32
w24 Word32
w25 Word32
w26 Word32
w27 Word32
w28 Word32
w29
Word32
w30 Word32
w31 Word32
w32 Word32
w33 Word32
w34 Word32
w35 Word32
w36 Word32
w37 Word32
w38 Word32
w39
Word32
w40 Word32
w41 Word32
w42 Word32
w43 Word32
w44 Word32
w45 Word32
w46 Word32
w47 Word32
w48 Word32
w49
Word32
w50 Word32
w51 Word32
w52 Word32
w53 Word32
w54 Word32
w55 Word32
w56 Word32
w57 Word32
w58 Word32
w59
Word32
w60 Word32
w61 Word32
w62 Word32
w63) <- Get SHA256Sched
getSHA256Sched
let s01 :: SHA256State
s01 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s00 Word32
0x428a2f98 Word32
w00
s02 :: SHA256State
s02 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s01 Word32
0x71374491 Word32
w01
s03 :: SHA256State
s03 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s02 Word32
0xb5c0fbcf Word32
w02
s04 :: SHA256State
s04 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s03 Word32
0xe9b5dba5 Word32
w03
s05 :: SHA256State
s05 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s04 Word32
0x3956c25b Word32
w04
s06 :: SHA256State
s06 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s05 Word32
0x59f111f1 Word32
w05
s07 :: SHA256State
s07 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s06 Word32
0x923f82a4 Word32
w06
s08 :: SHA256State
s08 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s07 Word32
0xab1c5ed5 Word32
w07
s09 :: SHA256State
s09 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s08 Word32
0xd807aa98 Word32
w08
s10 :: SHA256State
s10 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s09 Word32
0x12835b01 Word32
w09
s11 :: SHA256State
s11 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s10 Word32
0x243185be Word32
w10
s12 :: SHA256State
s12 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s11 Word32
0x550c7dc3 Word32
w11
s13 :: SHA256State
s13 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s12 Word32
0x72be5d74 Word32
w12
s14 :: SHA256State
s14 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s13 Word32
0x80deb1fe Word32
w13
s15 :: SHA256State
s15 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s14 Word32
0x9bdc06a7 Word32
w14
s16 :: SHA256State
s16 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s15 Word32
0xc19bf174 Word32
w15
s17 :: SHA256State
s17 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s16 Word32
0xe49b69c1 Word32
w16
s18 :: SHA256State
s18 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s17 Word32
0xefbe4786 Word32
w17
s19 :: SHA256State
s19 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s18 Word32
0x0fc19dc6 Word32
w18
s20 :: SHA256State
s20 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s19 Word32
0x240ca1cc Word32
w19
s21 :: SHA256State
s21 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s20 Word32
0x2de92c6f Word32
w20
s22 :: SHA256State
s22 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s21 Word32
0x4a7484aa Word32
w21
s23 :: SHA256State
s23 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s22 Word32
0x5cb0a9dc Word32
w22
s24 :: SHA256State
s24 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s23 Word32
0x76f988da Word32
w23
s25 :: SHA256State
s25 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s24 Word32
0x983e5152 Word32
w24
s26 :: SHA256State
s26 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s25 Word32
0xa831c66d Word32
w25
s27 :: SHA256State
s27 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s26 Word32
0xb00327c8 Word32
w26
s28 :: SHA256State
s28 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s27 Word32
0xbf597fc7 Word32
w27
s29 :: SHA256State
s29 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s28 Word32
0xc6e00bf3 Word32
w28
s30 :: SHA256State
s30 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s29 Word32
0xd5a79147 Word32
w29
s31 :: SHA256State
s31 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s30 Word32
0x06ca6351 Word32
w30
s32 :: SHA256State
s32 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s31 Word32
0x14292967 Word32
w31
s33 :: SHA256State
s33 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s32 Word32
0x27b70a85 Word32
w32
s34 :: SHA256State
s34 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s33 Word32
0x2e1b2138 Word32
w33
s35 :: SHA256State
s35 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s34 Word32
0x4d2c6dfc Word32
w34
s36 :: SHA256State
s36 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s35 Word32
0x53380d13 Word32
w35
s37 :: SHA256State
s37 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s36 Word32
0x650a7354 Word32
w36
s38 :: SHA256State
s38 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s37 Word32
0x766a0abb Word32
w37
s39 :: SHA256State
s39 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s38 Word32
0x81c2c92e Word32
w38
s40 :: SHA256State
s40 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s39 Word32
0x92722c85 Word32
w39
s41 :: SHA256State
s41 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s40 Word32
0xa2bfe8a1 Word32
w40
s42 :: SHA256State
s42 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s41 Word32
0xa81a664b Word32
w41
s43 :: SHA256State
s43 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s42 Word32
0xc24b8b70 Word32
w42
s44 :: SHA256State
s44 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s43 Word32
0xc76c51a3 Word32
w43
s45 :: SHA256State
s45 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s44 Word32
0xd192e819 Word32
w44
s46 :: SHA256State
s46 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s45 Word32
0xd6990624 Word32
w45
s47 :: SHA256State
s47 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s46 Word32
0xf40e3585 Word32
w46
s48 :: SHA256State
s48 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s47 Word32
0x106aa070 Word32
w47
s49 :: SHA256State
s49 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s48 Word32
0x19a4c116 Word32
w48
s50 :: SHA256State
s50 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s49 Word32
0x1e376c08 Word32
w49
s51 :: SHA256State
s51 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s50 Word32
0x2748774c Word32
w50
s52 :: SHA256State
s52 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s51 Word32
0x34b0bcb5 Word32
w51
s53 :: SHA256State
s53 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s52 Word32
0x391c0cb3 Word32
w52
s54 :: SHA256State
s54 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s53 Word32
0x4ed8aa4a Word32
w53
s55 :: SHA256State
s55 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s54 Word32
0x5b9cca4f Word32
w54
s56 :: SHA256State
s56 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s55 Word32
0x682e6ff3 Word32
w55
s57 :: SHA256State
s57 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s56 Word32
0x748f82ee Word32
w56
s58 :: SHA256State
s58 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s57 Word32
0x78a5636f Word32
w57
s59 :: SHA256State
s59 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s58 Word32
0x84c87814 Word32
w58
s60 :: SHA256State
s60 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s59 Word32
0x8cc70208 Word32
w59
s61 :: SHA256State
s61 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s60 Word32
0x90befffa Word32
w60
s62 :: SHA256State
s62 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s61 Word32
0xa4506ceb Word32
w61
s63 :: SHA256State
s63 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s62 Word32
0xbef9a3f7 Word32
w62
s64 :: SHA256State
s64 = SHA256State -> Word32 -> Word32 -> SHA256State
step256 SHA256State
s63 Word32
0xc67178f2 Word32
w63
SHA256S Word32
a64 Word32
b64 Word32
c64 Word32
d64 Word32
e64 Word32
f64 Word32
g64 Word32
h64 = SHA256State
s64
SHA256State -> Get SHA256State
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (SHA256State -> Get SHA256State) -> SHA256State -> Get SHA256State
forall a b. (a -> b) -> a -> b
$! Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> SHA256State
SHA256S (Word32
a00 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
a64) (Word32
b00 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
b64) (Word32
c00 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
c64) (Word32
d00 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
d64)
(Word32
e00 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
e64) (Word32
f00 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
f64) (Word32
g00 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
g64) (Word32
h00 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
h64)
{-# INLINE step256 #-}
step256 :: SHA256State -> Word32 -> Word32 -> SHA256State
step256 :: SHA256State -> Word32 -> Word32 -> SHA256State
step256 !(SHA256S Word32
a Word32
b Word32
c Word32
d Word32
e Word32
f Word32
g Word32
h) Word32
k Word32
w = Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> SHA256State
SHA256S Word32
a' Word32
b' Word32
c' Word32
d' Word32
e' Word32
f' Word32
g' Word32
h'
where
t1 :: Word32
t1 = Word32
h Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32
bsig256_1 Word32
e Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a -> a
ch Word32
e Word32
f Word32
g Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
k Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
w
t2 :: Word32
t2 = Word32 -> Word32
bsig256_0 Word32
a Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32 -> Word32 -> Word32 -> Word32
forall a. Bits a => a -> a -> a -> a
maj Word32
a Word32
b Word32
c
h' :: Word32
h' = Word32
g
g' :: Word32
g' = Word32
f
f' :: Word32
f' = Word32
e
e' :: Word32
e' = Word32
d Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
t1
d' :: Word32
d' = Word32
c
c' :: Word32
c' = Word32
b
b' :: Word32
b' = Word32
a
a' :: Word32
a' = Word32
t1 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
+ Word32
t2
processSHA512Block :: SHA512State -> Get SHA512State
processSHA512Block :: SHA512State -> Get SHA512State
processSHA512Block !s00 :: SHA512State
s00@(SHA512S Word64
a00 Word64
b00 Word64
c00 Word64
d00 Word64
e00 Word64
f00 Word64
g00 Word64
h00) = do
(SHA512Sched Word64
w00 Word64
w01 Word64
w02 Word64
w03 Word64
w04 Word64
w05 Word64
w06 Word64
w07 Word64
w08 Word64
w09
Word64
w10 Word64
w11 Word64
w12 Word64
w13 Word64
w14 Word64
w15 Word64
w16 Word64
w17 Word64
w18 Word64
w19
Word64
w20 Word64
w21 Word64
w22 Word64
w23 Word64
w24 Word64
w25 Word64
w26 Word64
w27 Word64
w28 Word64
w29
Word64
w30 Word64
w31 Word64
w32 Word64
w33 Word64
w34 Word64
w35 Word64
w36 Word64
w37 Word64
w38 Word64
w39
Word64
w40 Word64
w41 Word64
w42 Word64
w43 Word64
w44 Word64
w45 Word64
w46 Word64
w47 Word64
w48 Word64
w49
Word64
w50 Word64
w51 Word64
w52 Word64
w53 Word64
w54 Word64
w55 Word64
w56 Word64
w57 Word64
w58 Word64
w59
Word64
w60 Word64
w61 Word64
w62 Word64
w63 Word64
w64 Word64
w65 Word64
w66 Word64
w67 Word64
w68 Word64
w69
Word64
w70 Word64
w71 Word64
w72 Word64
w73 Word64
w74 Word64
w75 Word64
w76 Word64
w77 Word64
w78 Word64
w79) <- Get SHA512Sched
getSHA512Sched
let s01 :: SHA512State
s01 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s00 Word64
0x428a2f98d728ae22 Word64
w00
s02 :: SHA512State
s02 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s01 Word64
0x7137449123ef65cd Word64
w01
s03 :: SHA512State
s03 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s02 Word64
0xb5c0fbcfec4d3b2f Word64
w02
s04 :: SHA512State
s04 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s03 Word64
0xe9b5dba58189dbbc Word64
w03
s05 :: SHA512State
s05 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s04 Word64
0x3956c25bf348b538 Word64
w04
s06 :: SHA512State
s06 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s05 Word64
0x59f111f1b605d019 Word64
w05
s07 :: SHA512State
s07 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s06 Word64
0x923f82a4af194f9b Word64
w06
s08 :: SHA512State
s08 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s07 Word64
0xab1c5ed5da6d8118 Word64
w07
s09 :: SHA512State
s09 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s08 Word64
0xd807aa98a3030242 Word64
w08
s10 :: SHA512State
s10 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s09 Word64
0x12835b0145706fbe Word64
w09
s11 :: SHA512State
s11 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s10 Word64
0x243185be4ee4b28c Word64
w10
s12 :: SHA512State
s12 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s11 Word64
0x550c7dc3d5ffb4e2 Word64
w11
s13 :: SHA512State
s13 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s12 Word64
0x72be5d74f27b896f Word64
w12
s14 :: SHA512State
s14 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s13 Word64
0x80deb1fe3b1696b1 Word64
w13
s15 :: SHA512State
s15 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s14 Word64
0x9bdc06a725c71235 Word64
w14
s16 :: SHA512State
s16 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s15 Word64
0xc19bf174cf692694 Word64
w15
s17 :: SHA512State
s17 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s16 Word64
0xe49b69c19ef14ad2 Word64
w16
s18 :: SHA512State
s18 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s17 Word64
0xefbe4786384f25e3 Word64
w17
s19 :: SHA512State
s19 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s18 Word64
0x0fc19dc68b8cd5b5 Word64
w18
s20 :: SHA512State
s20 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s19 Word64
0x240ca1cc77ac9c65 Word64
w19
s21 :: SHA512State
s21 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s20 Word64
0x2de92c6f592b0275 Word64
w20
s22 :: SHA512State
s22 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s21 Word64
0x4a7484aa6ea6e483 Word64
w21
s23 :: SHA512State
s23 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s22 Word64
0x5cb0a9dcbd41fbd4 Word64
w22
s24 :: SHA512State
s24 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s23 Word64
0x76f988da831153b5 Word64
w23
s25 :: SHA512State
s25 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s24 Word64
0x983e5152ee66dfab Word64
w24
s26 :: SHA512State
s26 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s25 Word64
0xa831c66d2db43210 Word64
w25
s27 :: SHA512State
s27 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s26 Word64
0xb00327c898fb213f Word64
w26
s28 :: SHA512State
s28 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s27 Word64
0xbf597fc7beef0ee4 Word64
w27
s29 :: SHA512State
s29 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s28 Word64
0xc6e00bf33da88fc2 Word64
w28
s30 :: SHA512State
s30 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s29 Word64
0xd5a79147930aa725 Word64
w29
s31 :: SHA512State
s31 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s30 Word64
0x06ca6351e003826f Word64
w30
s32 :: SHA512State
s32 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s31 Word64
0x142929670a0e6e70 Word64
w31
s33 :: SHA512State
s33 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s32 Word64
0x27b70a8546d22ffc Word64
w32
s34 :: SHA512State
s34 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s33 Word64
0x2e1b21385c26c926 Word64
w33
s35 :: SHA512State
s35 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s34 Word64
0x4d2c6dfc5ac42aed Word64
w34
s36 :: SHA512State
s36 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s35 Word64
0x53380d139d95b3df Word64
w35
s37 :: SHA512State
s37 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s36 Word64
0x650a73548baf63de Word64
w36
s38 :: SHA512State
s38 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s37 Word64
0x766a0abb3c77b2a8 Word64
w37
s39 :: SHA512State
s39 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s38 Word64
0x81c2c92e47edaee6 Word64
w38
s40 :: SHA512State
s40 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s39 Word64
0x92722c851482353b Word64
w39
s41 :: SHA512State
s41 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s40 Word64
0xa2bfe8a14cf10364 Word64
w40
s42 :: SHA512State
s42 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s41 Word64
0xa81a664bbc423001 Word64
w41
s43 :: SHA512State
s43 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s42 Word64
0xc24b8b70d0f89791 Word64
w42
s44 :: SHA512State
s44 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s43 Word64
0xc76c51a30654be30 Word64
w43
s45 :: SHA512State
s45 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s44 Word64
0xd192e819d6ef5218 Word64
w44
s46 :: SHA512State
s46 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s45 Word64
0xd69906245565a910 Word64
w45
s47 :: SHA512State
s47 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s46 Word64
0xf40e35855771202a Word64
w46
s48 :: SHA512State
s48 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s47 Word64
0x106aa07032bbd1b8 Word64
w47
s49 :: SHA512State
s49 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s48 Word64
0x19a4c116b8d2d0c8 Word64
w48
s50 :: SHA512State
s50 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s49 Word64
0x1e376c085141ab53 Word64
w49
s51 :: SHA512State
s51 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s50 Word64
0x2748774cdf8eeb99 Word64
w50
s52 :: SHA512State
s52 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s51 Word64
0x34b0bcb5e19b48a8 Word64
w51
s53 :: SHA512State
s53 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s52 Word64
0x391c0cb3c5c95a63 Word64
w52
s54 :: SHA512State
s54 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s53 Word64
0x4ed8aa4ae3418acb Word64
w53
s55 :: SHA512State
s55 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s54 Word64
0x5b9cca4f7763e373 Word64
w54
s56 :: SHA512State
s56 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s55 Word64
0x682e6ff3d6b2b8a3 Word64
w55
s57 :: SHA512State
s57 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s56 Word64
0x748f82ee5defb2fc Word64
w56
s58 :: SHA512State
s58 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s57 Word64
0x78a5636f43172f60 Word64
w57
s59 :: SHA512State
s59 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s58 Word64
0x84c87814a1f0ab72 Word64
w58
s60 :: SHA512State
s60 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s59 Word64
0x8cc702081a6439ec Word64
w59
s61 :: SHA512State
s61 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s60 Word64
0x90befffa23631e28 Word64
w60
s62 :: SHA512State
s62 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s61 Word64
0xa4506cebde82bde9 Word64
w61
s63 :: SHA512State
s63 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s62 Word64
0xbef9a3f7b2c67915 Word64
w62
s64 :: SHA512State
s64 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s63 Word64
0xc67178f2e372532b Word64
w63
s65 :: SHA512State
s65 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s64 Word64
0xca273eceea26619c Word64
w64
s66 :: SHA512State
s66 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s65 Word64
0xd186b8c721c0c207 Word64
w65
s67 :: SHA512State
s67 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s66 Word64
0xeada7dd6cde0eb1e Word64
w66
s68 :: SHA512State
s68 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s67 Word64
0xf57d4f7fee6ed178 Word64
w67
s69 :: SHA512State
s69 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s68 Word64
0x06f067aa72176fba Word64
w68
s70 :: SHA512State
s70 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s69 Word64
0x0a637dc5a2c898a6 Word64
w69
s71 :: SHA512State
s71 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s70 Word64
0x113f9804bef90dae Word64
w70
s72 :: SHA512State
s72 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s71 Word64
0x1b710b35131c471b Word64
w71
s73 :: SHA512State
s73 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s72 Word64
0x28db77f523047d84 Word64
w72
s74 :: SHA512State
s74 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s73 Word64
0x32caab7b40c72493 Word64
w73
s75 :: SHA512State
s75 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s74 Word64
0x3c9ebe0a15c9bebc Word64
w74
s76 :: SHA512State
s76 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s75 Word64
0x431d67c49c100d4c Word64
w75
s77 :: SHA512State
s77 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s76 Word64
0x4cc5d4becb3e42b6 Word64
w76
s78 :: SHA512State
s78 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s77 Word64
0x597f299cfc657e2a Word64
w77
s79 :: SHA512State
s79 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s78 Word64
0x5fcb6fab3ad6faec Word64
w78
s80 :: SHA512State
s80 = SHA512State -> Word64 -> Word64 -> SHA512State
step512 SHA512State
s79 Word64
0x6c44198c4a475817 Word64
w79
SHA512S Word64
a80 Word64
b80 Word64
c80 Word64
d80 Word64
e80 Word64
f80 Word64
g80 Word64
h80 = SHA512State
s80
SHA512State -> Get SHA512State
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (SHA512State -> Get SHA512State) -> SHA512State -> Get SHA512State
forall a b. (a -> b) -> a -> b
$! Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> SHA512State
SHA512S (Word64
a00 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
a80) (Word64
b00 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
b80) (Word64
c00 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
c80) (Word64
d00 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
d80)
(Word64
e00 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
e80) (Word64
f00 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
f80) (Word64
g00 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
g80) (Word64
h00 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
h80)
{-# INLINE step512 #-}
step512 :: SHA512State -> Word64 -> Word64 -> SHA512State
step512 :: SHA512State -> Word64 -> Word64 -> SHA512State
step512 !(SHA512S Word64
a Word64
b Word64
c Word64
d Word64
e Word64
f Word64
g Word64
h) Word64
k Word64
w = Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> Word64
-> SHA512State
SHA512S Word64
a' Word64
b' Word64
c' Word64
d' Word64
e' Word64
f' Word64
g' Word64
h'
where
t1 :: Word64
t1 = Word64
h Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64
bsig512_1 Word64
e Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64 -> Word64 -> Word64
forall a. Bits a => a -> a -> a -> a
ch Word64
e Word64
f Word64
g Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
k Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
w
t2 :: Word64
t2 = Word64 -> Word64
bsig512_0 Word64
a Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64 -> Word64 -> Word64 -> Word64
forall a. Bits a => a -> a -> a -> a
maj Word64
a Word64
b Word64
c
h' :: Word64
h' = Word64
g
g' :: Word64
g' = Word64
f
f' :: Word64
f' = Word64
e
e' :: Word64
e' = Word64
d Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
t1
d' :: Word64
d' = Word64
c
c' :: Word64
c' = Word64
b
b' :: Word64
b' = Word64
a
a' :: Word64
a' = Word64
t1 Word64 -> Word64 -> Word64
forall a. Num a => a -> a -> a
+ Word64
t2
runSHA :: a -> (a -> Get a) -> ByteString -> a
runSHA :: forall a. a -> (a -> Get a) -> ByteString -> a
runSHA a
s a -> Get a
nextChunk ByteString
input = Get a -> ByteString -> a
forall a. Get a -> ByteString -> a
runGet (a -> Get a
getAll a
s) ByteString
input
where
getAll :: a -> Get a
getAll a
s_in = do
Bool
done <- Get Bool
isEmpty
if Bool
done
then a -> Get a
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return a
s_in
else a -> Get a
nextChunk a
s_in Get a -> (a -> Get a) -> Get a
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= a -> Get a
getAll
runSHAIncremental :: a -> (a -> Get a) -> Decoder a
runSHAIncremental :: forall a. a -> (a -> Get a) -> Decoder a
runSHAIncremental a
s a -> Get a
nextChunk = Get a -> Decoder a
forall a. Get a -> Decoder a
runGetIncremental (a -> Get a
getAll a
s)
where
getAll :: a -> Get a
getAll a
s_in = do
Bool
done <- Get Bool
isEmpty
if Bool
done
then a -> Get a
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return a
s_in
else a -> Get a
nextChunk a
s_in Get a -> (a -> Get a) -> Get a
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= a -> Get a
getAll
generic_complete :: (t -> [SBS.ByteString]) -> (a -> Put) -> Decoder a -> t
-> Digest a
generic_complete :: forall t a.
(t -> [ByteString]) -> (a -> Put) -> Decoder a -> t -> Digest a
generic_complete t -> [ByteString]
pad a -> Put
synthesize Decoder a
decoder t
len =
let decoder' :: Decoder a
decoder' = Decoder a -> Decoder a
forall a. Decoder a -> Decoder a
pushEndOfInput (Decoder a -> Decoder a) -> Decoder a -> Decoder a
forall a b. (a -> b) -> a -> b
$ (Decoder a -> ByteString -> Decoder a)
-> Decoder a -> [ByteString] -> Decoder a
forall b a. (b -> a -> b) -> b -> [a] -> b
forall (t :: * -> *) b a.
Foldable t =>
(b -> a -> b) -> b -> t a -> b
foldl' Decoder a -> ByteString -> Decoder a
forall a. Decoder a -> ByteString -> Decoder a
pushChunk Decoder a
decoder ([ByteString] -> Decoder a) -> [ByteString] -> Decoder a
forall a b. (a -> b) -> a -> b
$ t -> [ByteString]
pad t
len
in case Decoder a
decoder' of
Fail ByteString
_ Int64
_ String
_ -> String -> Digest a
forall a. HasCallStack => String -> a
error String
"Decoder is in Fail state."
Partial Maybe ByteString -> Decoder a
_ -> String -> Digest a
forall a. HasCallStack => String -> a
error String
"Decoder is in Partial state."
Done ByteString
_ Int64
_ a
x -> ByteString -> Digest a
forall t. ByteString -> Digest t
Digest (ByteString -> Digest a) -> ByteString -> Digest a
forall a b. (a -> b) -> a -> b
$ Put -> ByteString
runPut (Put -> ByteString) -> Put -> ByteString
forall a b. (a -> b) -> a -> b
$! a -> Put
synthesize a
x
sha1 :: ByteString -> Digest SHA1State
sha1 :: ByteString -> Digest SHA1State
sha1 ByteString
bs_in = ByteString -> Digest SHA1State
forall t. ByteString -> Digest t
Digest ByteString
bs_out
where
bs_pad :: ByteString
bs_pad = ByteString -> ByteString
padSHA1 ByteString
bs_in
fstate :: SHA1State
fstate = SHA1State
-> (SHA1State -> Get SHA1State) -> ByteString -> SHA1State
forall a. a -> (a -> Get a) -> ByteString -> a
runSHA SHA1State
initialSHA1State SHA1State -> Get SHA1State
processSHA1Block ByteString
bs_pad
bs_out :: ByteString
bs_out = Put -> ByteString
runPut (Put -> ByteString) -> Put -> ByteString
forall a b. (a -> b) -> a -> b
$! SHA1State -> Put
synthesizeSHA1 SHA1State
fstate
sha1Incremental :: Decoder SHA1State
sha1Incremental :: Decoder SHA1State
sha1Incremental = SHA1State -> (SHA1State -> Get SHA1State) -> Decoder SHA1State
forall a. a -> (a -> Get a) -> Decoder a
runSHAIncremental SHA1State
initialSHA1State SHA1State -> Get SHA1State
processSHA1Block
completeSha1Incremental :: Decoder SHA1State -> Int -> Digest SHA1State
completeSha1Incremental :: Decoder SHA1State -> Int -> Digest SHA1State
completeSha1Incremental = (Int -> [ByteString])
-> (SHA1State -> Put)
-> Decoder SHA1State
-> Int
-> Digest SHA1State
forall t a.
(t -> [ByteString]) -> (a -> Put) -> Decoder a -> t -> Digest a
generic_complete Int -> [ByteString]
padSHA1Chunks SHA1State -> Put
synthesizeSHA1
sha224 :: ByteString -> Digest SHA256State
sha224 :: ByteString -> Digest SHA256State
sha224 ByteString
bs_in = ByteString -> Digest SHA256State
forall t. ByteString -> Digest t
Digest ByteString
bs_out
where
bs_pad :: ByteString
bs_pad = ByteString -> ByteString
padSHA1 ByteString
bs_in
fstate :: SHA256State
fstate = SHA256State
-> (SHA256State -> Get SHA256State) -> ByteString -> SHA256State
forall a. a -> (a -> Get a) -> ByteString -> a
runSHA SHA256State
initialSHA224State SHA256State -> Get SHA256State
processSHA256Block ByteString
bs_pad
bs_out :: ByteString
bs_out = Put -> ByteString
runPut (Put -> ByteString) -> Put -> ByteString
forall a b. (a -> b) -> a -> b
$! SHA256State -> Put
synthesizeSHA224 SHA256State
fstate
sha224Incremental :: Decoder SHA256State
sha224Incremental :: Decoder SHA256State
sha224Incremental = SHA256State
-> (SHA256State -> Get SHA256State) -> Decoder SHA256State
forall a. a -> (a -> Get a) -> Decoder a
runSHAIncremental SHA256State
initialSHA224State SHA256State -> Get SHA256State
processSHA256Block
completeSha224Incremental :: Decoder SHA256State -> Int -> Digest SHA256State
completeSha224Incremental :: Decoder SHA256State -> Int -> Digest SHA256State
completeSha224Incremental = (Int -> [ByteString])
-> (SHA256State -> Put)
-> Decoder SHA256State
-> Int
-> Digest SHA256State
forall t a.
(t -> [ByteString]) -> (a -> Put) -> Decoder a -> t -> Digest a
generic_complete Int -> [ByteString]
padSHA1Chunks SHA256State -> Put
synthesizeSHA224
sha256 :: ByteString -> Digest SHA256State
sha256 :: ByteString -> Digest SHA256State
sha256 ByteString
bs_in = ByteString -> Digest SHA256State
forall t. ByteString -> Digest t
Digest ByteString
bs_out
where
bs_pad :: ByteString
bs_pad = ByteString -> ByteString
padSHA1 ByteString
bs_in
fstate :: SHA256State
fstate = SHA256State
-> (SHA256State -> Get SHA256State) -> ByteString -> SHA256State
forall a. a -> (a -> Get a) -> ByteString -> a
runSHA SHA256State
initialSHA256State SHA256State -> Get SHA256State
processSHA256Block ByteString
bs_pad
bs_out :: ByteString
bs_out = Put -> ByteString
runPut (Put -> ByteString) -> Put -> ByteString
forall a b. (a -> b) -> a -> b
$! SHA256State -> Put
synthesizeSHA256 SHA256State
fstate
sha256Incremental :: Decoder SHA256State
sha256Incremental :: Decoder SHA256State
sha256Incremental = SHA256State
-> (SHA256State -> Get SHA256State) -> Decoder SHA256State
forall a. a -> (a -> Get a) -> Decoder a
runSHAIncremental SHA256State
initialSHA256State SHA256State -> Get SHA256State
processSHA256Block
completeSha256Incremental :: Decoder SHA256State -> Int -> Digest SHA256State
completeSha256Incremental :: Decoder SHA256State -> Int -> Digest SHA256State
completeSha256Incremental = (Int -> [ByteString])
-> (SHA256State -> Put)
-> Decoder SHA256State
-> Int
-> Digest SHA256State
forall t a.
(t -> [ByteString]) -> (a -> Put) -> Decoder a -> t -> Digest a
generic_complete Int -> [ByteString]
padSHA1Chunks SHA256State -> Put
synthesizeSHA256
sha384 :: ByteString -> Digest SHA512State
sha384 :: ByteString -> Digest SHA512State
sha384 ByteString
bs_in = ByteString -> Digest SHA512State
forall t. ByteString -> Digest t
Digest ByteString
bs_out
where
bs_pad :: ByteString
bs_pad = ByteString -> ByteString
padSHA512 ByteString
bs_in
fstate :: SHA512State
fstate = SHA512State
-> (SHA512State -> Get SHA512State) -> ByteString -> SHA512State
forall a. a -> (a -> Get a) -> ByteString -> a
runSHA SHA512State
initialSHA384State SHA512State -> Get SHA512State
processSHA512Block ByteString
bs_pad
bs_out :: ByteString
bs_out = Put -> ByteString
runPut (Put -> ByteString) -> Put -> ByteString
forall a b. (a -> b) -> a -> b
$! SHA512State -> Put
synthesizeSHA384 SHA512State
fstate
sha384Incremental :: Decoder SHA512State
sha384Incremental :: Decoder SHA512State
sha384Incremental = SHA512State
-> (SHA512State -> Get SHA512State) -> Decoder SHA512State
forall a. a -> (a -> Get a) -> Decoder a
runSHAIncremental SHA512State
initialSHA384State SHA512State -> Get SHA512State
processSHA512Block
completeSha384Incremental :: Decoder SHA512State -> Int -> Digest SHA512State
completeSha384Incremental :: Decoder SHA512State -> Int -> Digest SHA512State
completeSha384Incremental = (Int -> [ByteString])
-> (SHA512State -> Put)
-> Decoder SHA512State
-> Int
-> Digest SHA512State
forall t a.
(t -> [ByteString]) -> (a -> Put) -> Decoder a -> t -> Digest a
generic_complete Int -> [ByteString]
padSHA512Chunks SHA512State -> Put
synthesizeSHA384
sha512 :: ByteString -> Digest SHA512State
sha512 :: ByteString -> Digest SHA512State
sha512 ByteString
bs_in = ByteString -> Digest SHA512State
forall t. ByteString -> Digest t
Digest ByteString
bs_out
where
bs_pad :: ByteString
bs_pad = ByteString -> ByteString
padSHA512 ByteString
bs_in
fstate :: SHA512State
fstate = SHA512State
-> (SHA512State -> Get SHA512State) -> ByteString -> SHA512State
forall a. a -> (a -> Get a) -> ByteString -> a
runSHA SHA512State
initialSHA512State SHA512State -> Get SHA512State
processSHA512Block ByteString
bs_pad
bs_out :: ByteString
bs_out = Put -> ByteString
runPut (Put -> ByteString) -> Put -> ByteString
forall a b. (a -> b) -> a -> b
$! SHA512State -> Put
synthesizeSHA512 SHA512State
fstate
sha512Incremental :: Decoder SHA512State
sha512Incremental :: Decoder SHA512State
sha512Incremental = SHA512State
-> (SHA512State -> Get SHA512State) -> Decoder SHA512State
forall a. a -> (a -> Get a) -> Decoder a
runSHAIncremental SHA512State
initialSHA512State SHA512State -> Get SHA512State
processSHA512Block
completeSha512Incremental :: Decoder SHA512State -> Int -> Digest SHA512State
completeSha512Incremental :: Decoder SHA512State -> Int -> Digest SHA512State
completeSha512Incremental = (Int -> [ByteString])
-> (SHA512State -> Put)
-> Decoder SHA512State
-> Int
-> Digest SHA512State
forall t a.
(t -> [ByteString]) -> (a -> Put) -> Decoder a -> t -> Digest a
generic_complete Int -> [ByteString]
padSHA512Chunks SHA512State -> Put
synthesizeSHA512
hmacSha1
:: ByteString
-> ByteString
-> Digest SHA1State
hmacSha1 :: ByteString -> ByteString -> Digest SHA1State
hmacSha1 = (ByteString -> Digest SHA1State)
-> Int -> ByteString -> ByteString -> Digest SHA1State
forall t.
(ByteString -> Digest t)
-> Int -> ByteString -> ByteString -> Digest t
hmac ByteString -> Digest SHA1State
sha1 Int
64
hmacSha224
:: ByteString
-> ByteString
-> Digest SHA256State
hmacSha224 :: ByteString -> ByteString -> Digest SHA256State
hmacSha224 = (ByteString -> Digest SHA256State)
-> Int -> ByteString -> ByteString -> Digest SHA256State
forall t.
(ByteString -> Digest t)
-> Int -> ByteString -> ByteString -> Digest t
hmac ByteString -> Digest SHA256State
sha224 Int
64
hmacSha256
:: ByteString
-> ByteString
-> Digest SHA256State
hmacSha256 :: ByteString -> ByteString -> Digest SHA256State
hmacSha256 = (ByteString -> Digest SHA256State)
-> Int -> ByteString -> ByteString -> Digest SHA256State
forall t.
(ByteString -> Digest t)
-> Int -> ByteString -> ByteString -> Digest t
hmac ByteString -> Digest SHA256State
sha256 Int
64
hmacSha384
:: ByteString
-> ByteString
-> Digest SHA512State
hmacSha384 :: ByteString -> ByteString -> Digest SHA512State
hmacSha384 = (ByteString -> Digest SHA512State)
-> Int -> ByteString -> ByteString -> Digest SHA512State
forall t.
(ByteString -> Digest t)
-> Int -> ByteString -> ByteString -> Digest t
hmac ByteString -> Digest SHA512State
sha384 Int
128
hmacSha512
:: ByteString
-> ByteString
-> Digest SHA512State
hmacSha512 :: ByteString -> ByteString -> Digest SHA512State
hmacSha512 = (ByteString -> Digest SHA512State)
-> Int -> ByteString -> ByteString -> Digest SHA512State
forall t.
(ByteString -> Digest t)
-> Int -> ByteString -> ByteString -> Digest t
hmac ByteString -> Digest SHA512State
sha512 Int
128
hmac :: (ByteString -> Digest t) -> Int -> ByteString -> ByteString -> Digest t
hmac :: forall t.
(ByteString -> Digest t)
-> Int -> ByteString -> ByteString -> Digest t
hmac ByteString -> Digest t
f Int
bl ByteString
k ByteString
m = ByteString -> Digest t
f (ByteString -> ByteString -> ByteString
BS.append ByteString
opad (Digest t -> ByteString
forall t. Digest t -> ByteString
bytestringDigest (ByteString -> Digest t
f (ByteString -> ByteString -> ByteString
BS.append ByteString
ipad ByteString
m))))
where
opad :: ByteString
opad = (Word8 -> Word8) -> ByteString -> ByteString
BS.map (Word8 -> Word8 -> Word8
forall a. Bits a => a -> a -> a
xor Word8
ov) ByteString
k'
ipad :: ByteString
ipad = (Word8 -> Word8) -> ByteString -> ByteString
BS.map (Word8 -> Word8 -> Word8
forall a. Bits a => a -> a -> a
xor Word8
iv) ByteString
k'
ov :: Word8
ov = Word8
0x5c :: Word8
iv :: Word8
iv = Word8
0x36 :: Word8
k' :: ByteString
k' = ByteString -> ByteString -> ByteString
BS.append ByteString
kt ByteString
pad
where
kt :: ByteString
kt = if Int64
kn Int64 -> Int64 -> Bool
forall a. Ord a => a -> a -> Bool
> Int64
bn then Digest t -> ByteString
forall t. Digest t -> ByteString
bytestringDigest (ByteString -> Digest t
f ByteString
k) else ByteString
k
pad :: ByteString
pad = Int64 -> Word8 -> ByteString
BS.replicate (Int64
bn Int64 -> Int64 -> Int64
forall a. Num a => a -> a -> a
- Int64
ktn) Word8
0
kn :: Int64
kn = Int64 -> Int64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (ByteString -> Int64
BS.length ByteString
k)
ktn :: Int64
ktn = Int64 -> Int64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (ByteString -> Int64
BS.length ByteString
kt)
bn :: Int64
bn = Int -> Int64
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
bl
showDigest :: Digest t -> String
showDigest :: forall t. Digest t -> String
showDigest (Digest ByteString
bs) = ByteString -> String
showDigestBS ByteString
bs
showDigestBS :: ByteString -> String
showDigestBS :: ByteString -> String
showDigestBS ByteString
bs = (Word8 -> ShowS) -> String -> [Word8] -> String
forall a b. (a -> b -> b) -> b -> [a] -> b
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr Word8 -> ShowS
forall {a}. (Integral a, Bits a) => a -> ShowS
paddedShowHex [] (ByteString -> [Word8]
BS.unpack ByteString
bs)
where
paddedShowHex :: a -> ShowS
paddedShowHex a
x String
xs = Int -> Char
intToDigit (a -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (a
x a -> Int -> a
forall a. Bits a => a -> Int -> a
`shiftR` Int
4))
Char -> ShowS
forall a. a -> [a] -> [a]
: Int -> Char
intToDigit (a -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (a
x a -> a -> a
forall a. Bits a => a -> a -> a
.&. a
0xf))
Char -> ShowS
forall a. a -> [a] -> [a]
: String
xs
integerDigest :: Digest t -> Integer
integerDigest :: forall t. Digest t -> Integer
integerDigest (Digest ByteString
bs) = (Integer -> Word8 -> Integer) -> Integer -> ByteString -> Integer
forall a. (a -> Word8 -> a) -> a -> ByteString -> a
BS.foldl' Integer -> Word8 -> Integer
forall {a} {a}. (Bits a, Integral a, Num a) => a -> a -> a
addShift Integer
0 ByteString
bs
where addShift :: a -> a -> a
addShift a
n a
y = (a
n a -> Int -> a
forall a. Bits a => a -> Int -> a
`shiftL` Int
8) a -> a -> a
forall a. Bits a => a -> a -> a
.|. a -> a
forall a b. (Integral a, Num b) => a -> b
fromIntegral a
y
bytestringDigest :: Digest t -> ByteString
bytestringDigest :: forall t. Digest t -> ByteString
bytestringDigest (Digest ByteString
bs) = ByteString
bs