Commits

Anonymous committed 60a4d08

Finishing up the scrypt auth package

Comments (0)

Files changed (3)

+.ghci
+dist

snaplet-auth-scrypt.cabal

 Name:                snaplet-auth-scrypt
-
 Version:             0.0.1
-
 Synopsis:            An scrypt replacement for the shipped auth snaplet that uses password-store
-
 Description:         Snap ships with an Auth snaplet that uses the Crypto.PasswordStore API to create passwords; which is sub-par. This package replaces password-store with Crypto.Scrypt to generate and verify passwords.
 
 Homepage:            https://bitbucket.org/ixmatus/snaplet-auth-scrypt
-
 License:             BSD3
-
 License-file:        LICENSE
-
 Author:              Parnell Springmeyer
-
 Maintainer:          ixmatus@gmail.com
-
 Copyright:           (c) 2013 Parnell Springmeyer
-
-Category:            Snap web www
-
+Category:            Snap, Web
 Build-type:          Simple
 
-Stability:           alpha
-
 Bug-reports:         https://bitbucket.org/ixmatus/snaplet-auth-scrypt/issues
-
 Package-url:         http://hackage.haskell.org/package/snaplet-auth-scrypt
 
-Tested-with:         GHC == 7.4.1
+Cabal-version:       >=1.10
 
-Data-files:          README.md
+Library
+  hs-source-dirs: src
 
-Cabal-version:       >=1.14.0
-
-Executable maelstrom
-
-  Main-is: maelstrom.hs
-
-  Hs-source-dirs: src
-
-  cpp-options: -Dcabal
-
-  Ghc-options: -Wall
-
-  Build-depends: base >= 4.2.0.0 && < 4.6,
-                 scrypt >= 0.1 && < 0.2,
+  exposed-modules:
+    Snap.Snaplet.Auth.Types
+  
+  default-language: Haskell2010
+  
+  build-depends:
+    base                       >= 4       && < 5,
+    bytestring                 >= 0.9.1   && < 0.11,
+    snap                       >= 0.10    && < 0.11,
+    scrypt                     >=0.3.4    && < 0.4,
+    text                       >=0.11.2.3 && < 0.12,
+    time                       >=1.4      && < 1.5,
+    hashable                   >=1.1.2.5  && < 1.2,
+    unordered-containers       >=0.2.2.1  && < 0.3,
+    configurator               >=0.2.0.1  && < 0.3,
+    aeson                      >=0.6.0.2  && < 0.7,
+    mtl                        >=2.1.2    && < 2.2
+    
+  ghc-options: -Wall -fwarn-tabs -funbox-strict-fields
+               -fno-warn-orphans -fno-warn-unused-do-bind
 
 Source-repository head
   Type:     hg

src/Snap/Snaplet/Auth/Types.hs

     :: ByteString               -- ^ Cleartext
     -> ByteString               -- ^ Encrypted reference
     -> Bool
-verify cpass epass = verifyPass' cpass (EncryptedPass epass)
+verify cpass epass = verifyPass' (Pass cpass) (EncryptedPass epass)
 
 
 ------------------------------------------------------------------------------