Compare commits

...

3 Commits

Author SHA1 Message Date
Jonathan Lamothe 82f2c6c5fb version 0.3.1.1 2023-05-02 17:29:31 -04:00
Jonathan Lamothe d7da4b2924 use LTS 20.19 resolver 2023-05-02 17:27:58 -04:00
Jonathan Lamothe 0267ce8792 removed GitHub references 2023-05-02 16:48:44 -04:00
8 changed files with 48 additions and 41 deletions

View File

@ -1,5 +1,10 @@
# Changelog for passman # Changelog for passman
## 0.3.1.1
- updated documentation to on longer mention GitHub
- updated resolver to LTS 20.19
## 0.3.1 ## 0.3.1
- set maximum version of transformers package - set maximum version of transformers package

View File

@ -1,6 +1,6 @@
# passman # passman
Copyright (C) 2018-2021 Jonathan Lamothe Copyright (C) 2018-2023 Jonathan Lamothe
<jonathan@jlamothe.net> <jonathan@jlamothe.net>
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
@ -41,16 +41,11 @@ for instructions on installing Haskell Stack. Once you have done
this, you can simply enter the command `stack install passman` in the this, you can simply enter the command `stack install passman` in the
terminal to install passman. terminal to install passman.
## GitHub ## Codeberg
The most recent version of passman can be found on GitHub at The most recent version of passman can be found on Codeberg at
<https://github.com/jlamothe/passman>. <https://codeberg.org/jlamothe/passman>.
## Pull Requests ## Pull Requests
Pull requests are welcome, but should be made to the `dev` branch. Pull requests are welcome, but should be made to the `dev` branch.
## Donations
Bitcoin donations are accepted (but not required) at:
18hqEsXCinyauDp6smPUEVuscjDdasTKvr

View File

@ -26,7 +26,7 @@ module Types (Status (Status), gen, dbPath, masterPass, database) where
import Lens.Micro (set, (^.)) import Lens.Micro (set, (^.))
import Lens.Micro.TH (makeLenses) import Lens.Micro.TH (makeLenses)
import System.Random (RandomGen (next, split), StdGen) import System.Random (RandomGen (genWord64, split), StdGen)
import Password import Password
@ -40,8 +40,8 @@ data Status = Status
makeLenses ''Status makeLenses ''Status
instance RandomGen Status where instance RandomGen Status where
next s = (x, s') where genWord64 s = (x, s') where
(x, g') = next g (x, g') = genWord64 g
s' = set gen g' s s' = set gen g' s
g = s^.gen g = s^.gen
split s = (s1, s2) where split s = (s1, s2) where

View File

@ -1,9 +1,9 @@
name: passman name: passman
version: 0.3.1 version: 0.3.1.1
license: LGPL-3.0-or-later license: LGPL-3.0-or-later
author: "Jonathan Lamothe" author: "Jonathan Lamothe"
maintainer: "jonathan@jlamothe.net" maintainer: "jonathan@jlamothe.net"
copyright: "(C) 2018-2021 Jonathan Lamothe" copyright: "(C) 2018-2023 Jonathan Lamothe"
homepage: https://codeberg.org/jlamothe/passman homepage: https://codeberg.org/jlamothe/passman
bug-reports: https://codeberg.org/jlamothe/passman/issues bug-reports: https://codeberg.org/jlamothe/passman/issues
@ -22,12 +22,12 @@ description: a simple password manager - see README.md for details
dependencies: dependencies:
- base >= 4.7 && < 5 - base >= 4.7 && < 5
- aeson >= 1.5.6.0 && < 1.6 - aeson >= 2.0.3.0 && < 2.1
- bytestring >= 0.10.12.0 && < 0.11 - bytestring >= 0.11.4.0 && < 0.12
- containers >= 0.6.2.1 && < 0.7 - containers >= 0.6.2.1 && < 0.7
- microlens >= 0.4.11.2 && < 0.5 - microlens >= 0.4.11.2 && < 0.5
- microlens-th >= 0.4.3.6 && < 0.5 - microlens-th >= 0.4.3.6 && < 0.5
- random >=1.1 && < 1.2 - random >=1.2.1.1 && < 1.3
ghc-options: ghc-options:
- -Wall - -Wall
@ -35,8 +35,8 @@ ghc-options:
library: library:
source-dirs: src source-dirs: src
dependencies: dependencies:
- base16-bytestring >= 0.1.1.7 && < 0.2 - base16-bytestring >= 1.0.2.0 && < 1.1
- base64-bytestring >= 1.1.0.0 && < 1.2 - base64-bytestring >= 1.2.1.0 && < 1.3
- SHA >= 1.6.4.4 && < 1.7 - SHA >= 1.6.4.4 && < 1.7
- text >= 1.2.4.1 && < 1.3 - text >= 1.2.4.1 && < 1.3

View File

@ -1,13 +1,13 @@
cabal-version: 2.2 cabal-version: 2.2
-- This file has been generated from package.yaml by hpack version 0.34.4. -- This file has been generated from package.yaml by hpack version 0.35.1.
-- --
-- see: https://github.com/sol/hpack -- see: https://github.com/sol/hpack
-- --
-- hash: 28f118d81a1b3ac7f27513c569620a2eab195e5abd718c66c5a9d5529ec0268a -- hash: da6c3020622e5c4c06814752b3f3334e52925005f8b3be9516efb9fd1976af9c
name: passman name: passman
version: 0.3.1 version: 0.3.1.1
synopsis: a simple password manager synopsis: a simple password manager
description: a simple password manager - see README.md for details description: a simple password manager - see README.md for details
category: Security category: Security
@ -15,7 +15,7 @@ homepage: https://codeberg.org/jlamothe/passman
bug-reports: https://codeberg.org/jlamothe/passman/issues bug-reports: https://codeberg.org/jlamothe/passman/issues
author: Jonathan Lamothe author: Jonathan Lamothe
maintainer: jonathan@jlamothe.net maintainer: jonathan@jlamothe.net
copyright: (C) 2018-2021 Jonathan Lamothe copyright: (C) 2018-2023 Jonathan Lamothe
license: LGPL-3.0-or-later license: LGPL-3.0-or-later
license-file: LICENSE license-file: LICENSE
build-type: Simple build-type: Simple
@ -28,20 +28,22 @@ library
Password Password
other-modules: other-modules:
Paths_passman Paths_passman
autogen-modules:
Paths_passman
hs-source-dirs: hs-source-dirs:
src src
ghc-options: -Wall ghc-options: -Wall
build-depends: build-depends:
SHA >=1.6.4.4 && <1.7 SHA >=1.6.4.4 && <1.7
, aeson >=1.5.6.0 && <1.6 , aeson >=2.0.3.0 && <2.1
, base >=4.7 && <5 , base >=4.7 && <5
, base16-bytestring >=0.1.1.7 && <0.2 , base16-bytestring >=1.0.2.0 && <1.1
, base64-bytestring >=1.1.0.0 && <1.2 , base64-bytestring >=1.2.1.0 && <1.3
, bytestring >=0.10.12.0 && <0.11 , bytestring >=0.11.4.0 && <0.12
, containers >=0.6.2.1 && <0.7 , containers >=0.6.2.1 && <0.7
, microlens >=0.4.11.2 && <0.5 , microlens >=0.4.11.2 && <0.5
, microlens-th >=0.4.3.6 && <0.5 , microlens-th >=0.4.3.6 && <0.5
, random ==1.1.* , random >=1.2.1.1 && <1.3
, text >=1.2.4.1 && <1.3 , text >=1.2.4.1 && <1.3
default-language: Haskell2010 default-language: Haskell2010
@ -52,20 +54,22 @@ executable passman
UI UI
Util Util
Paths_passman Paths_passman
autogen-modules:
Paths_passman
hs-source-dirs: hs-source-dirs:
app app
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
build-depends: build-depends:
HCL ==1.8.* HCL ==1.8.*
, aeson >=1.5.6.0 && <1.6 , aeson >=2.0.3.0 && <2.1
, base >=4.7 && <5 , base >=4.7 && <5
, bytestring >=0.10.12.0 && <0.11 , bytestring >=0.11.4.0 && <0.12
, containers >=0.6.2.1 && <0.7 , containers >=0.6.2.1 && <0.7
, easy-file >=0.2.2 && <0.3 , easy-file >=0.2.2 && <0.3
, microlens >=0.4.11.2 && <0.5 , microlens >=0.4.11.2 && <0.5
, microlens-th >=0.4.3.6 && <0.5 , microlens-th >=0.4.3.6 && <0.5
, passman , passman
, random ==1.1.* , random >=1.2.1.1 && <1.3
, transformers >=0.5.6.2 && <0.6 , transformers >=0.5.6.2 && <0.6
default-language: Haskell2010 default-language: Haskell2010
@ -88,17 +92,19 @@ test-suite passman-test
Spec.ValidatePWDatabase Spec.ValidatePWDatabase
Spec.ValidatePWPolicy Spec.ValidatePWPolicy
Paths_passman Paths_passman
autogen-modules:
Paths_passman
hs-source-dirs: hs-source-dirs:
test test
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
build-depends: build-depends:
HUnit HUnit
, aeson >=1.5.6.0 && <1.6 , aeson >=2.0.3.0 && <2.1
, base >=4.7 && <5 , base >=4.7 && <5
, bytestring >=0.10.12.0 && <0.11 , bytestring >=0.11.4.0 && <0.12
, containers >=0.6.2.1 && <0.7 , containers >=0.6.2.1 && <0.7
, microlens >=0.4.11.2 && <0.5 , microlens >=0.4.11.2 && <0.5
, microlens-th >=0.4.3.6 && <0.5 , microlens-th >=0.4.3.6 && <0.5
, passman , passman
, random ==1.1.* , random >=1.2.1.1 && <1.3
default-language: Haskell2010 default-language: Haskell2010

View File

@ -63,6 +63,7 @@ import qualified Data.ByteString.Base16.Lazy as B16
import qualified Data.ByteString.Base64.Lazy as B64 import qualified Data.ByteString.Base64.Lazy as B64
import Data.Char (isUpper, isLower, isDigit, isAlphaNum, toLower) import Data.Char (isUpper, isLower, isDigit, isAlphaNum, toLower)
import Data.Digest.Pure.SHA import Data.Digest.Pure.SHA
import Data.Either (fromRight)
import qualified Data.Map as M import qualified Data.Map as M
import Data.Maybe (fromMaybe) import Data.Maybe (fromMaybe)
import qualified Data.Text as T import qualified Data.Text as T
@ -341,7 +342,7 @@ mkSeed :: String -> PWData ->B.ByteString
mkSeed pw d = toUTF8 pw `B.append` (d^.pwSalt.to runPWSalt) mkSeed pw d = toUTF8 pw `B.append` (d^.pwSalt.to runPWSalt)
mkHash :: B.ByteString -> B.ByteString mkHash :: B.ByteString -> B.ByteString
mkHash = fst . B16.decode . toUTF8 . show . sha256 mkHash = fromRight "" . B16.decode . toUTF8 . show . sha256
nextPolicy :: Char -> PWPolicy -> PWPolicy nextPolicy :: Char -> PWPolicy -> PWPolicy
nextPolicy x p = over pwLength pred $ nextPolicy x p = over pwLength pred $

View File

@ -17,7 +17,7 @@
# #
# resolver: ./custom-snapshot.yaml # resolver: ./custom-snapshot.yaml
# resolver: https://example.com/snapshots/2018-01-01.yaml # resolver: https://example.com/snapshots/2018-01-01.yaml
resolver: lts-17.10 resolver: lts-20.19
# User packages to be built. # User packages to be built.
# Various formats can be used as shown in the example below. # Various formats can be used as shown in the example below.

View File

@ -7,13 +7,13 @@ packages:
- completed: - completed:
hackage: HCL-1.8@sha256:39ec0da0cd6157f20c395e1b0df474df45efb0088afdaab20bb9dfb3662baf7c,1726 hackage: HCL-1.8@sha256:39ec0da0cd6157f20c395e1b0df474df45efb0088afdaab20bb9dfb3662baf7c,1726
pantry-tree: pantry-tree:
size: 1223
sha256: 5c93c5184dc378de5ecf235aa1a60dc24163ab7e0efad19c8f3bbc94354cf2b8 sha256: 5c93c5184dc378de5ecf235aa1a60dc24163ab7e0efad19c8f3bbc94354cf2b8
size: 1223
original: original:
hackage: HCL-1.8@sha256:39ec0da0cd6157f20c395e1b0df474df45efb0088afdaab20bb9dfb3662baf7c,1726 hackage: HCL-1.8@sha256:39ec0da0cd6157f20c395e1b0df474df45efb0088afdaab20bb9dfb3662baf7c,1726
snapshots: snapshots:
- completed: - completed:
size: 567241 sha256: 42f77c84b34f68c30c2cd0bf8c349f617a0f428264362426290847a6a2019b64
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/17/10.yaml size: 649618
sha256: 321b3b9f0c7f76994b39e0dabafdc76478274b4ff74cc5e43d410897a335ad3b url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/19.yaml
original: lts-17.10 original: lts-20.19