1diff -ru orig/Crypto/PasswordStore.hs new/Crypto/PasswordStore.hs
2--- orig/Crypto/PasswordStore.hs 2013-09-17 11:48:49.178111970 +0300
3+++ new/Crypto/PasswordStore.hs 2013-09-17 11:48:49.000000000 +0300
5 {-# LANGUAGE OverloadedStrings, BangPatterns #-}
8 -- Module : Crypto.PasswordStore
9 -- Copyright : (c) Peter Scott, 2011
12 -- ^ The encoded message
13 hmacSHA256 secret msg =
14- let digest = SHA.hmacSha256 (BL.fromStrict secret) (BL.fromStrict msg)
15- in BL.toStrict . SHA.bytestringDigest $ digest
16+ let digest = SHA.hmacSha256 (fromStrict secret) (fromStrict msg)
17+ in toStrict . SHA.bytestringDigest $ digest
19 -- | PBKDF2 key-derivation function.
20 -- For details see @http://tools.ietf.org/html/rfc2898@.
22 where (a, g') = randomR ('\NUL', '\255') g
23 salt = makeSalt $ B.pack $ map fst (rands gen 16)
24 newgen = snd $ last (rands gen 16)
26+#if !MIN_VERSION_base(4, 6, 0)
27+-- | Strict version of 'modifySTRef'
28+modifySTRef' :: STRef s a -> (a -> a) -> ST s ()
29+modifySTRef' ref f = do
32+ x' `seq` writeSTRef ref x'
35+#if MIN_VERSION_bytestring(0, 10, 0)
36+toStrict :: BL.ByteString -> BS.ByteString
37+toStrict = BL.toStrict
39+fromStrict :: BS.ByteString -> BL.ByteString
40+fromStrict = BL.fromStrict
42+toStrict :: BL.ByteString -> BS.ByteString
43+toStrict = BS.concat . BL.toChunks
45+fromStrict :: BS.ByteString -> BL.ByteString
46+fromStrict = BL.fromChunks . return
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list