diff options
author | lloyd <[email protected]> | 2008-05-25 21:14:40 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-05-25 21:14:40 +0000 |
commit | 25609cd77358c4de86a9100dcd49b1d8ad07f19a (patch) | |
tree | c63ec72513883260e3124065dfd709b282a351eb /checks/pk.cpp | |
parent | 89e20a742ada5000c8a78fbbf0bf8bd3b13565eb (diff) |
Make the two parameters of Randpool (which underlying block cipher and MAC
to use) explicit arguments to the constructor instead of being hardcoded.
Diffstat (limited to 'checks/pk.cpp')
-rw-r--r-- | checks/pk.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/checks/pk.cpp b/checks/pk.cpp index 0deab355c..fdb22624d 100644 --- a/checks/pk.cpp +++ b/checks/pk.cpp @@ -195,7 +195,9 @@ u32bit do_pk_validation_tests(const std::string& filename) std::cout << std::endl; - global_state().set_prng(new ANSI_X931_RNG("AES-128", new Randpool)); + global_state().set_prng(new ANSI_X931_RNG("AES-128", + new Randpool("AES-256", + "HMAC(SHA-256)"))); for(u32bit j = 0; j != 2; j++) global_state().seed_prng(true, 384); @@ -250,7 +252,10 @@ void validate_encryption(PK_Encryptor* e, PK_Decryptor* d, failure = true; } - global_state().set_prng(new ANSI_X931_RNG("AES-128", new Randpool)); + global_state().set_prng(new ANSI_X931_RNG("AES-128", + new Randpool("AES-256", + "HMAC(SHA-256)"))); + for(u32bit j = 0; j != 2; j++) global_state().seed_prng(true, 384); @@ -291,7 +296,9 @@ void validate_signature(PK_Verifier* v, PK_Signer* s, const std::string& algo, failure = true; } - global_state().set_prng(new ANSI_X931_RNG("AES-128", new Randpool)); + global_state().set_prng(new ANSI_X931_RNG("AES-128", + new Randpool("AES-256", + "HMAC(SHA-256)"))); for(u32bit j = 0; j != 2; j++) global_state().seed_prng(true, 384); |