diff options
author | Joey Hess <joey@kitenet.net> | 2011-04-17 11:09:33 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-04-17 11:09:33 -0400 |
commit | eafb51959225d871b94136b7b02c5cf7752d49be (patch) | |
tree | 4a1a73b574b9719c1b8b0ca4e2763afbadc9b1c3 /Crypto.hs | |
parent | 3d2a0f68b53dd6045558c232f5e5d860dde3ff91 (diff) |
hmacSha1 wants the secret key as first parameter
I was offline last night and going by function signatures, and unable to
tell which was which. Note sure it matters to HMAC which comes first;
better safe than sorry.
Diffstat (limited to 'Crypto.hs')
-rw-r--r-- | Crypto.hs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -131,8 +131,8 @@ encryptKey :: Cipher -> Key -> IO Key encryptKey c k = return Key { keyName = showDigest $ hmacSha1 - (fromString $ show k) - (fromString $ cipherHmac c), + (fromString $ cipherHmac c) + (fromString $ show k), keyBackendName = "GPGHMACSHA1", keySize = Nothing, -- size and mtime omitted keyMtime = Nothing -- to avoid leaking data |