summaryrefslogtreecommitdiffhomepage
path: root/CmdLine.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-08-16 13:07:43 -0400
committerJoey Hess <joeyh@joeyh.name>2016-08-16 13:08:13 -0400
commit3229b02f0aa6bb23e351d00ade1263851a2f1826 (patch)
treed6dd95a8c9cd72f0355cbbb40f49888708ba986d /CmdLine.hs
parent3b4a775d536b2b2956269a59f886487efe29ed51 (diff)
downloadkeysafe-3229b02f0aa6bb23e351d00ade1263851a2f1826.tar.gz
add --benchmark
Diffstat (limited to 'CmdLine.hs')
-rw-r--r--CmdLine.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/CmdLine.hs b/CmdLine.hs
index b47d609..8e3040a 100644
--- a/CmdLine.hs
+++ b/CmdLine.hs
@@ -17,12 +17,12 @@ data CmdLine = CmdLine
}
deriving (Show)
-data Mode = Backup | Restore
+data Mode = Backup | Restore | Benchmark
deriving (Show)
parse :: Parser CmdLine
parse = CmdLine
- <$> (backup <|> restore)
+ <$> (backup <|> restore <|> benchmark)
<*> keytypeopt
<*> testmodeswitch
<*> guiswitch
@@ -35,6 +35,10 @@ parse = CmdLine
( long "restore"
<> help "Retrieve a secret key from keysafe."
)
+ benchmark = flag' Benchmark
+ ( long "benchmark"
+ <> help "Benchmark speed of keysafe's cryptographic primitives."
+ )
keytypeopt = KeyType . BU8.fromString <$> strOption
( long "type"
<> help "Type of key (eg, \"gpg\")."