Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Przemyslaw Kaminski
haskell-gargantext
Commits
db0a62b6
Commit
db0a62b6
authored
Sep 07, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] warnings
parent
7a2130c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
Pass.hs
src/Gargantext/Prelude/Crypto/Pass.hs
+2
-5
No files found.
src/Gargantext/Prelude/Crypto/Pass.hs
View file @
db0a62b6
...
@@ -29,7 +29,6 @@ import Crypto.Random.AESCtr
...
@@ -29,7 +29,6 @@ import Crypto.Random.AESCtr
import
Data.Binary
(
decode
)
import
Data.Binary
(
decode
)
import
Prelude
import
Prelude
import
qualified
Data.ByteString.Lazy
as
B
import
qualified
Data.ByteString.Lazy
as
B
import
qualified
Data.ByteString.Internal
as
DBI
import
Gargantext.Prelude
(
cs
)
import
Gargantext.Prelude
(
cs
)
import
Data.ByteString
as
S
(
ByteString
,
unpack
)
import
Data.ByteString
as
S
(
ByteString
,
unpack
)
import
Data.ByteString.Char8
as
C8
(
pack
)
import
Data.ByteString.Char8
as
C8
(
pack
)
...
@@ -95,10 +94,8 @@ printPass len = do
...
@@ -95,10 +94,8 @@ printPass len = do
_
<-
runStateT
(
showRandomKey
len
as'
)
aesState
-- enter loop
_
<-
runStateT
(
showRandomKey
len
as'
)
aesState
-- enter loop
return
()
return
()
gargPass
::
Int
->
IO
(
Int
,
AESRNG
)
gargPass
::
IO
(
Int
,
AESRNG
)
gargPass
len
=
do
gargPass
=
do
let
as
=
[
"alphanumeric"
,
"punctuation"
]
let
as'
=
filter
(
\
c
->
elem
c
keysAll
)
.
nub
$
unwords
as
aesState
<-
makeSystem
-- gather entropy from the system to use as the initial seed
aesState
<-
makeSystem
-- gather entropy from the system to use as the initial seed
pass
<-
runStateT
aesRandomInt
aesState
-- enter loop
pass
<-
runStateT
aesRandomInt
aesState
-- enter loop
pure
pass
pure
pass
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment