mirror of
https://github.com/redelmann/scat
synced 2025-01-10 06:34:20 +01:00
Merge pull request #1 from luke-clifton/master
Updated cabal dependencies and made change for new scrypt API.
This commit is contained in:
commit
c9e460ad42
12
scat.cabal
12
scat.cabal
@ -10,7 +10,7 @@ name: scat
|
|||||||
-- PVP summary: +-+------- breaking API changes
|
-- PVP summary: +-+------- breaking API changes
|
||||||
-- | | +----- non-breaking API additions
|
-- | | +----- non-breaking API additions
|
||||||
-- | | | +--- code changes with no API change
|
-- | | | +--- code changes with no API change
|
||||||
version: 1.0.2.0
|
version: 1.0.2.1
|
||||||
|
|
||||||
-- A short (one-line) description of the package.
|
-- A short (one-line) description of the package.
|
||||||
synopsis: Generates unique passwords for various websites from a single password.
|
synopsis: Generates unique passwords for various websites from a single password.
|
||||||
@ -67,5 +67,11 @@ executable scat
|
|||||||
other-modules: Scat.Builder, Scat.Schemas, Scat.Options, Scat.Utils.Permutation, Paths_scat
|
other-modules: Scat.Builder, Scat.Schemas, Scat.Options, Scat.Utils.Permutation, Paths_scat
|
||||||
|
|
||||||
-- Other library packages from which modules are imported.
|
-- Other library packages from which modules are imported.
|
||||||
build-depends: base ==4.5.*, scrypt ==0.3.*, bytestring ==0.9.*, optparse-applicative ==0.5.*, mtl ==2.1.*, vector ==0.10.*, ansi-terminal ==0.6.*
|
build-depends: base >=4.5 && <5
|
||||||
|
, scrypt == 0.5.*
|
||||||
|
, bytestring
|
||||||
|
, optparse-applicative >= 0.5
|
||||||
|
, mtl
|
||||||
|
, vector == 0.10.*
|
||||||
|
, ansi-terminal >= 0.6.1
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import Scat.Options
|
|||||||
-- | Generates the seed integer given a service, a password and a code.
|
-- | Generates the seed integer given a service, a password and a code.
|
||||||
scatter :: ByteString -> ByteString -> ByteString -> Integer
|
scatter :: ByteString -> ByteString -> ByteString -> Integer
|
||||||
scatter k pw c = foldr (\ n s -> fromIntegral n + 256 * s) 0 $
|
scatter k pw c = foldr (\ n s -> fromIntegral n + 256 * s) 0 $
|
||||||
unpack $ unHash $ scrypt params (Salt k) (Pass $ pw <> c)
|
unpack $ getHash $ scrypt params (Salt k) (Pass $ pw <> c)
|
||||||
where
|
where
|
||||||
Just params = scryptParams 14 8 50
|
Just params = scryptParams 14 8 50
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user