diff --git a/Data/Digest/Pure/SHA.hs b/Data/Digest/Pure/SHA.hs
--- a/Data/Digest/Pure/SHA.hs
+++ b/Data/Digest/Pure/SHA.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE BangPatterns, CPP #-}
+{-# LANGUAGE BangPatterns, CPP, FlexibleInstances #-}
 -- |Pure implementations of the SHA suite of hash functions. The implementation
 -- is basically an unoptimized translation of FIPS 180-2 into Haskell. If you're
 -- looking for performance, you probably won't find it here.
@@ -28,20 +28,32 @@
        )
  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 Data.Char (intToDigit)
-import Data.Word
 
 -- | An abstract datatype for digests.
-newtype Digest = Digest ByteString deriving (Eq,Ord)
+newtype Digest t = Digest ByteString deriving (Eq,Ord)
 
-instance Show Digest where
+instance Show (Digest t) where
   show = showDigest
 
+instance Binary (Digest SHA1State) where
+  get = fmap Digest $ getLazyByteString 20
+  put (Digest bs) = put bs
+
+instance Binary (Digest SHA256State) where
+  get = fmap Digest $ getLazyByteString 32
+  put (Digest bs) = put bs
+
+instance Binary (Digest SHA512State) where
+  get = fmap Digest $ getLazyByteString 64
+  put (Digest bs) = put bs
+
 -- --------------------------------------------------------------------------
 --
 -- State Definitions and Initial States
@@ -81,10 +93,11 @@
 
 -- --------------------------------------------------------------------------
 --
--- Synthesize of states to ByteStrings
+-- Synthesize of states to and from ByteStrings
 --
 -- --------------------------------------------------------------------------
 
+
 synthesizeSHA1 :: SHA1State -> Put
 synthesizeSHA1 (SHA1S a b c d e) = do
   putWord32be a
@@ -93,6 +106,15 @@
   putWord32be d
   putWord32be e
 
+getSHA1 :: Get SHA1State
+getSHA1 = do
+  a <- getWord32be
+  b <- getWord32be
+  c <- getWord32be
+  d <- getWord32be
+  e <- getWord32be
+  return $ SHA1S a b c d e
+  
 synthesizeSHA224 :: SHA256State -> Put
 synthesizeSHA224 (SHA256S a b c d e f g _) = do
   putWord32be a
@@ -102,7 +124,7 @@
   putWord32be e
   putWord32be f
   putWord32be g
-
+  
 synthesizeSHA256 :: SHA256State -> Put
 synthesizeSHA256 (SHA256S a b c d e f g h) = do
   putWord32be a
@@ -114,6 +136,18 @@
   putWord32be g
   putWord32be h
 
+getSHA256 :: Get SHA256State
+getSHA256 = do
+  a <- getWord32be
+  b <- getWord32be
+  c <- getWord32be
+  d <- getWord32be
+  e <- getWord32be
+  f <- getWord32be
+  g <- getWord32be
+  h <- getWord32be  
+  return $ SHA256S a b c d e f g h
+
 synthesizeSHA384 :: SHA512State -> Put
 synthesizeSHA384 (SHA512S a b c d e f _ _) = do
   putWord64be a
@@ -122,7 +156,7 @@
   putWord64be d
   putWord64be e
   putWord64be f
-
+  
 synthesizeSHA512 :: SHA512State -> Put
 synthesizeSHA512 (SHA512S a b c d e f g h) = do
   putWord64be a
@@ -134,6 +168,31 @@
   putWord64be g
   putWord64be h
 
+getSHA512 :: Get SHA512State
+getSHA512 = do
+  a <- getWord64be
+  b <- getWord64be
+  c <- getWord64be
+  d <- getWord64be
+  e <- getWord64be
+  f <- getWord64be
+  g <- getWord64be
+  h <- getWord64be
+  return $ SHA512S a b c d e f g h
+
+instance Binary SHA1State where
+  put = synthesizeSHA1
+  get = getSHA1
+  
+instance Binary SHA256State where
+  put = synthesizeSHA256
+  get = getSHA256
+
+instance Binary SHA512State where
+  put = synthesizeSHA512
+  get = getSHA512
+
+
 -- --------------------------------------------------------------------------
 --
 -- Padding
@@ -880,7 +939,7 @@
 -- |Compute the SHA-1 hash of the given ByteString. The output is guaranteed
 -- to be exactly 160 bits, or 20 bytes, long. This is a good default for
 -- programs that need a good, but not necessarily hyper-secure, hash function.
-sha1 :: ByteString -> Digest
+sha1 :: ByteString -> Digest SHA1State
 sha1 bs_in = Digest bs_out
  where
   bs_pad = padSHA1 bs_in
@@ -891,7 +950,7 @@
 -- SHA-384 differ only slightly from SHA-256 and SHA-512, and use truncated
 -- versions of the resulting hashes. So using 224/384 may not, in fact, save
 -- you very much ...
-sha224 :: ByteString -> Digest
+sha224 :: ByteString -> Digest SHA256State
 sha224 bs_in = Digest bs_out
  where
   bs_pad = padSHA1 bs_in
@@ -902,7 +961,7 @@
 -- to be exactly 256 bits, or 32 bytes, long. If your security requirements
 -- are pretty serious, this is a good choice. For truly significant security
 -- concerns, however, you might try one of the bigger options.
-sha256 :: ByteString -> Digest
+sha256 :: ByteString -> Digest SHA256State
 sha256 bs_in = Digest bs_out
  where
   bs_pad = padSHA1 bs_in
@@ -911,7 +970,7 @@
 
 -- |Compute the SHA-384 hash of the given ByteString. Yup, you guessed it,
 -- the output will be exactly 384 bits, or 48 bytes, long.
-sha384 :: ByteString -> Digest
+sha384 :: ByteString -> Digest SHA512State
 sha384 bs_in = Digest bs_out
  where
   bs_pad = padSHA512 bs_in
@@ -921,7 +980,7 @@
 -- |For those for whom only the biggest hashes will do, this computes the
 -- SHA-512 hash of the given ByteString. The output will be 64 bytes, or
 -- 512 bits, long.
-sha512 :: ByteString -> Digest
+sha512 :: ByteString -> Digest SHA512State
 sha512 bs_in = Digest bs_out
  where
   bs_pad = padSHA512 bs_in
@@ -934,40 +993,40 @@
 hmacSha1
   :: ByteString  -- ^ secret key
   -> ByteString  -- ^ message
-  -> Digest      -- ^ SHA-1 MAC
+  -> Digest SHA1State     -- ^ SHA-1 MAC
 hmacSha1 = hmac sha1 64
 
 -- | Compute an HMAC using SHA-224.
 hmacSha224
   :: ByteString  -- ^ secret key
   -> ByteString  -- ^ message
-  -> Digest      -- ^ SHA-224 MAC
+  -> Digest SHA256State     -- ^ SHA-224 MAC
 hmacSha224 = hmac sha224 64
 
 -- | Compute an HMAC using SHA-256.
 hmacSha256
   :: ByteString  -- ^ secret key
   -> ByteString  -- ^ message
-  -> Digest      -- ^ SHA-256 MAC
+  -> Digest SHA256State  -- ^ SHA-256 MAC
 hmacSha256 = hmac sha256 64
 
 -- | Compute an HMAC using SHA-384.
 hmacSha384
   :: ByteString  -- ^ secret key
   -> ByteString  -- ^ message
-  -> Digest      -- ^ SHA-384 MAC
+  -> Digest SHA512State     -- ^ SHA-384 MAC
 hmacSha384 = hmac sha384 128
 
 -- | Compute an HMAC using SHA-512.
 hmacSha512
   :: ByteString  -- ^ secret key
   -> ByteString  -- ^ message
-  -> Digest      -- ^ SHA-512 MAC
+  -> Digest SHA512State     -- ^ SHA-512 MAC
 hmacSha512 = hmac sha512 128
 
 -- --------------------------------------------------------------------------
 
-hmac :: (ByteString -> Digest) -> Int -> ByteString -> ByteString -> Digest
+hmac :: (ByteString -> Digest t) -> Int -> ByteString -> ByteString -> Digest t
 hmac f bl k m = f (BS.append opad (bytestringDigest (f (BS.append ipad m))))
  where
   opad = BS.map (xor ov) k'
@@ -992,7 +1051,7 @@
 
 -- | Convert a digest to a string.
 -- The digest is rendered as fixed with hexadecimal number.
-showDigest :: Digest -> String
+showDigest :: Digest t -> String
 showDigest (Digest bs) = showDigestBS bs
 
 -- |Prints out a bytestring in hexadecimal. Just for convenience.
@@ -1004,10 +1063,10 @@
                       : xs
 
 -- | Convert a digest to an Integer.
-integerDigest :: Digest -> Integer
+integerDigest :: Digest t -> Integer
 integerDigest (Digest bs) = BS.foldl' addShift 0 bs
  where addShift n y = (n `shiftL` 8) .|. fromIntegral y
 
 -- | Convert a digest to a ByteString.
-bytestringDigest :: Digest -> ByteString
+bytestringDigest :: Digest t -> ByteString
 bytestringDigest (Digest bs) = bs
diff --git a/SHA.cabal b/SHA.cabal
--- a/SHA.cabal
+++ b/SHA.cabal
@@ -1,6 +1,6 @@
 name:       SHA
 category:   Cryptography, Codec
-version:    1.4.1.3
+version:    1.5.0.0
 license:    BSD3
 license-file: LICENSE
 author:     Adam Wick <awick@galois.com>, Brian Lewis <brian@lorf.org>
diff --git a/Test.hs b/Test.hs
# file too large to diff: Test.hs
