2010-10-15 23:33:10 +00:00
|
|
|
{- git-annex "SHA1" backend
|
2010-10-10 19:27:49 +00:00
|
|
|
- -}
|
|
|
|
|
2010-10-15 23:33:10 +00:00
|
|
|
module Backend.SHA1 (backend) where
|
2010-10-10 19:27:49 +00:00
|
|
|
|
|
|
|
import Data.Digest.Pure.SHA
|
2010-10-16 20:20:49 +00:00
|
|
|
|
|
|
|
import qualified Backend.File
|
2010-10-14 06:52:17 +00:00
|
|
|
import BackendTypes
|
2010-10-10 19:27:49 +00:00
|
|
|
|
2010-10-14 07:50:28 +00:00
|
|
|
backend = Backend.File.backend {
|
2010-10-15 23:33:10 +00:00
|
|
|
name = "SHA1",
|
2010-10-10 19:27:49 +00:00
|
|
|
getKey = keyValue
|
|
|
|
}
|
|
|
|
|
2010-10-10 19:41:35 +00:00
|
|
|
-- checksum the file to get its key
|
2010-10-14 01:28:47 +00:00
|
|
|
keyValue :: FilePath -> Annex (Maybe Key)
|
2010-10-15 23:33:10 +00:00
|
|
|
keyValue k = error "SHA1 keyValue unimplemented" -- TODO
|