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.
This commit is contained in:
parent
3d2a0f68b5
commit
eafb519592
1 changed files with 2 additions and 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
|
||||
|
|
Loading…
Add table
Reference in a new issue