Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PaymentServer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Administrator
PaymentServer
Commits
57a7dde6
Commit
57a7dde6
authored
5 years ago
by
Jean-Paul Calderone
Browse files
Options
Downloads
Patches
Plain Diff
Stay away from String where I can
parent
4fca14fb
Branches
Branches containing commit
No related tags found
1 merge request
!22
Ristretto-flavored PrivacyPass
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
PaymentServer.cabal
+1
-0
1 addition, 0 deletions
PaymentServer.cabal
generate-key/Main.hs
+8
-0
8 additions, 0 deletions
generate-key/Main.hs
src/PaymentServer/Ristretto.hs
+2
-2
2 additions, 2 deletions
src/PaymentServer/Ristretto.hs
with
11 additions
and
2 deletions
PaymentServer.cabal
+
1
−
0
View file @
57a7dde6
...
...
@@ -52,6 +52,7 @@ executable PaymentServer-generate-key
main-is: Main.hs
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wmissing-import-lists -Wunused-imports
build-depends: base
, text
, PaymentServer
default-language: Haskell2010
...
...
This diff is collapsed.
Click to expand it.
generate-key/Main.hs
+
8
−
0
View file @
57a7dde6
...
...
@@ -2,6 +2,14 @@ module Main
(
main
)
where
import
Prelude
hiding
(
putStrLn
)
import
Data.Text.IO
(
putStrLn
)
import
PaymentServer.Ristretto
(
randomSigningKey
)
...
...
This diff is collapsed.
Click to expand it.
src/PaymentServer/Ristretto.hs
+
2
−
2
View file @
57a7dde6
...
...
@@ -73,11 +73,11 @@ ristretto textSigningKey textTokens = do
-- | randomSigningKey generates a new signing key at random and returns it
-- encoded as a base64 string.
randomSigningKey
::
IO
String
randomSigningKey
::
IO
Text
randomSigningKey
=
do
cSigningKey
<-
signing_key_random
cString
<-
signing_key_encode_base64
cSigningKey
signing_key_destroy
cSigningKey
result
<-
peekCString
cString
free
cString
return
result
return
$
pack
result
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment