diff options
author | lloyd <[email protected]> | 2009-11-17 05:03:06 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-11-17 05:03:06 +0000 |
commit | 0d27bc0f8763cb6dd6307dbab7713058dee18b2c (patch) | |
tree | 5cb428e1c4475ca24f1e4a84dfdc07c7a9e91393 /checks | |
parent | 0753d6e2c478430d8cd1a0df8d21f68a05260300 (diff) |
Rename/remove some secmem member variables for better matching with STL
containers (specifically vector).
Rename is_empty to empty
Remove has_items
Rename create to resize
Diffstat (limited to 'checks')
-rw-r--r-- | checks/block.cpp | 2 | ||||
-rw-r--r-- | checks/pk_bench.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/checks/block.cpp b/checks/block.cpp index 1e7de3726..8f07cd65c 100644 --- a/checks/block.cpp +++ b/checks/block.cpp @@ -30,7 +30,7 @@ class ECB_Encryption_ErrorCheck : public Filter cipher = get_block_cipher(cipher_name); input_hash = get_hash(HASH); decrypt_hash = get_hash(HASH); - buffer.create(BLOCKSIZE); + buffer.resize(BLOCKSIZE); cipher->set_key(key); position = 0; } diff --git a/checks/pk_bench.cpp b/checks/pk_bench.cpp index 9a94d8474..31c48c1da 100644 --- a/checks/pk_bench.cpp +++ b/checks/pk_bench.cpp @@ -81,7 +81,7 @@ void benchmark_enc_dec(PK_Encryptor& enc, PK_Decryptor& dec, { if(enc_timer.seconds() < seconds || ciphertext.size() == 0) { - plaintext.create(enc.maximum_input_size()); + plaintext.resize(enc.maximum_input_size()); // Ensure for Raw, etc, it stays large if((i % 100) == 0) @@ -122,7 +122,7 @@ void benchmark_sig_ver(PK_Verifier& ver, PK_Signer& sig, { if((i % 100) == 0) { - message.create(48); + message.resize(48); rng.randomize(message.begin(), message.size()); } @@ -142,7 +142,7 @@ void benchmark_sig_ver(PK_Verifier& ver, PK_Signer& sig, if((i % 100) == 0) { - sig_random.create(signature.size()); + sig_random.resize(signature.size()); rng.randomize(sig_random, sig_random.size()); verify_timer.start(); |