Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix bitrotted tests/DSA.hs

  • Loading branch information...
commit e989b40e2b1637fa5a69d9480be003d138cf5bb6 1 parent 9277f35
@phonohawk phonohawk authored
Showing with 10 additions and 7 deletions.
  1. +3 −0  .gitignore
  2. +7 −7 tests/DSA.hs
View
3  .gitignore
@@ -7,3 +7,6 @@ examples/GenRSAKey
examples/HelloWorld
examples/PKCS7
examples/Server
+tests/Base64
+tests/Cipher
+tests/DSA
View
14 tests/DSA.hs
@@ -13,7 +13,7 @@ test_generateParameters = do
0xb6, 0x21, 0x1b, 0x40,
0x62, 0xba, 0x32, 0x24,
0xe0, 0x42, 0x7d, 0xd3]
- (a, b, p, q, g) <- generateParameters 512 $ Just seed
+ (a, b, p, q, g) <- generateDSAParameters 512 $ Just seed
return $ (a, p, q, g) == (105,
0x8df2a494492276aa3d25759bb06869cbeac0d83afb8d0cf7cbb8324f0d7882e5d0762fc5b7210eafc2e9adac32ab7aac49693dfbf83724c2ec0736ee31c80291,
0xc773218c737ec8ee993b4f2ded30f48edace915f,
@@ -22,16 +22,16 @@ test_generateParameters = do
testMessage = BS.pack [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
test_signVerify = do
- dsa <- generateParametersAndKey 512 Nothing
- (a, b) <- signDigestedData dsa testMessage
- verifyDigestedData dsa testMessage (a, b)
+ dsa <- generateDSAParametersAndKey 512 Nothing
+ (a, b) <- signDigestedDataWithDSA dsa testMessage
+ verifyDigestedDataWithDSA dsa testMessage (a, b)
test_signVerifySpeed = do
- dsa <- generateParametersAndKey 512 Nothing
+ dsa <- generateDSAParametersAndKey 512 Nothing
let test = do
- (a, b) <- signDigestedData dsa testMessage
- True <- verifyDigestedData dsa testMessage (a, b)
+ (a, b) <- signDigestedDataWithDSA dsa testMessage
+ True <- verifyDigestedDataWithDSA dsa testMessage (a, b)
return ()
starttime <- getClockTime
Please sign in to comment.
Something went wrong with that request. Please try again.