aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/mceies
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-06-29 14:02:37 +0200
committerSimon Warta <[email protected]>2015-06-30 10:38:23 +0200
commit1de5fc1419add86884df97580d7a2e745ad43bff (patch)
tree295eafb79cab7843888133abbad07fb983915520 /src/lib/pubkey/mceies
parent8668ce8753b10e944bdc72b6e66d752759c7e710 (diff)
More changes for use with debug STL
Diffstat (limited to 'src/lib/pubkey/mceies')
-rw-r--r--src/lib/pubkey/mceies/mceies.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/pubkey/mceies/mceies.cpp b/src/lib/pubkey/mceies/mceies.cpp
index 6b013c250..9e9ae1cb8 100644
--- a/src/lib/pubkey/mceies/mceies.cpp
+++ b/src/lib/pubkey/mceies/mceies.cpp
@@ -58,8 +58,8 @@ mceies_encrypt(const McEliece_PublicKey& pubkey,
secure_vector<byte> msg(mce_ciphertext.size() + nonce.size() + pt.size());
copy_mem(msg.data(), mce_ciphertext.data(), mce_ciphertext.size());
- copy_mem(&msg[mce_ciphertext.size()], nonce.data(), nonce.size());
- copy_mem(&msg[mce_ciphertext.size() + nonce.size()], pt.data(), pt.size());
+ copy_mem(msg.data() + mce_ciphertext.size(), nonce.data(), nonce.size());
+ copy_mem(msg.data() + mce_ciphertext.size() + nonce.size(), pt.data(), pt.size());
aead->start(nonce);
aead->finish(msg, mce_ciphertext.size() + nonce.size());
@@ -91,7 +91,7 @@ mceies_decrypt(const McEliece_PrivateKey& privkey,
aead->set_key(aead_key(mce_key, *aead));
aead->set_associated_data(ad, ad_len);
- secure_vector<byte> pt(&ct[mce_code_bytes + nonce_len], &ct[ct.size()]);
+ secure_vector<byte> pt(ct.begin() + mce_code_bytes + nonce_len, ct.end());
aead->start(&ct[mce_code_bytes], nonce_len);
aead->finish(pt, 0);