summaryrefslogtreecommitdiff
path: root/test.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-04-15 00:38:48 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-04-15 00:38:48 +0000
commit78cbd84a0068db09b6d08ff14a316800ad9be89a (patch)
tree2be608b49b99003d7d6f49ac33abd7bbe763d7d9 /test.cpp
parent0a0244dacface689335de6e0edf978b29ddb66e1 (diff)
downloadcryptopp-78cbd84a0068db09b6d08ff14a316800ad9be89a.tar.gz
fix bug in Grouper
add RIPEMD-???, Whirlpool, Shacal2, Camellia, Two-Track MAC (Kevin Springle) change ChannelSwitch to allow non-blocking input (denis bider) change Redirector to allow more options (denis bider) fix MaurerRandomnessTest optimize MD2 (Kevin Springle) git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@55 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'test.cpp')
-rw-r--r--test.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/test.cpp b/test.cpp
index 21eb4f3..964eabb 100644
--- a/test.cpp
+++ b/test.cpp
@@ -201,7 +201,14 @@ int main(int argc, char *argv[])
}
}
case 'm':
- DigestFile(argv[2]);
+ if (command == "mt")
+ {
+ MaurerRandomnessTest mt;
+ FileStore(argv[2]).TransferAllTo(mt);
+ cout << "Maurer Test Value: " << mt.GetTestValue() << endl;
+ }
+ else
+ DigestFile(argv[2]);
return 0;
case 't':
{
@@ -547,7 +554,7 @@ void RSASignFile(const char *privFilename, const char *messageFilename, const ch
FileSource privFile(privFilename, true, new HexDecoder);
RSASSA_PKCS1v15_SHA_Signer priv(privFile);
// RSASSA_PKCS1v15_SHA_Signer ignores the rng. Use a real RNG for other signature schemes!
- FileSource f(messageFilename, true, new SignerFilter(NullRNG(), priv, new HexEncoder(new FileSink(signatureFilename))));
+ FileSource f(messageFilename, true, new SignerFilter(GlobalRNG(), priv, new HexEncoder(new FileSink(signatureFilename))));
}
bool RSAVerifyFile(const char *pubFilename, const char *messageFilename, const char *signatureFilename)
@@ -922,6 +929,10 @@ bool Validate(int alg, bool thorough, const char *seed)
case 57: result = ValidateESIGN(); break;
case 58: result = ValidateDLIES(); break;
case 59: result = ValidateBaseCode(); break;
+ case 60: result = ValidateSHACAL2(); break;
+ case 61: result = ValidateCamellia(); break;
+ case 62: result = ValidateWhirlpool(); break;
+ case 63: result = ValidateTTMAC(); break;
default: result = ValidateAll(thorough); break;
}