diff options
author | lloyd <[email protected]> | 2010-09-15 13:44:42 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-09-15 13:44:42 +0000 |
commit | 180c5358cb31e9c003cada3705bb30cf01732878 (patch) | |
tree | 951038dfaf2c33bcee5e27c4b1d2980eb35494a3 /src/cms | |
parent | a9d0f37596e5413cae45f32740738c5c68abcce1 (diff) |
Update all uses of MemoryRegion::append to use either push_back or operator+=
Diffstat (limited to 'src/cms')
-rw-r--r-- | src/cms/cms_algo.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cms/cms_algo.cpp b/src/cms/cms_algo.cpp index 8c6806699..458e8e3f5 100644 --- a/src/cms/cms_algo.cpp +++ b/src/cms/cms_algo.cpp @@ -35,7 +35,7 @@ SecureVector<byte> do_rfc3217_wrap(RandomNumberGenerator& rng, void write(const byte data[], u32bit length) { - buf.append(data, length); + buf += std::make_pair(data, length); } void end_msg() { @@ -43,7 +43,8 @@ SecureVector<byte> do_rfc3217_wrap(RandomNumberGenerator& rng, send(buf[buf.size()-j-1]); buf.clear(); } - Flip_Bytes(const SecureVector<byte>& prefix) { buf.append(prefix); } + + Flip_Bytes(const SecureVector<byte>& prefix) : buf(prefix) {} private: SecureVector<byte> buf; }; @@ -98,10 +99,10 @@ SecureVector<byte> CMS_Encoder::wrap_key(RandomNumberGenerator& rng, throw Encoding_Error("CMS: 128-bit KEKs must be used with " + cipher); SecureVector<byte> lcekpad; - lcekpad.append((byte)cek.length()); - lcekpad.append(cek.bits_of()); + lcekpad.push_back((byte)cek.length()); + lcekpad += cek.bits_of(); while(lcekpad.size() % 8) - lcekpad.append(rng.next_byte()); + lcekpad.push_back(rng.next_byte()); return do_rfc3217_wrap(rng, cipher, kek, lcekpad); } #endif |