diff options
Diffstat (limited to 'doc/examples/encrypt2.cpp')
-rw-r--r-- | doc/examples/encrypt2.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/examples/encrypt2.cpp b/doc/examples/encrypt2.cpp index 41f4fb478..c6c735af9 100644 --- a/doc/examples/encrypt2.cpp +++ b/doc/examples/encrypt2.cpp @@ -28,10 +28,10 @@ int main() const u32bit PBKDF2_ITERATIONS = 8192; - SecureVector<byte> salt(8); + secure_vector<byte> salt(8); rng.randomize(&salt[0], salt.size()); - SecureVector<byte> master_key = pbkdf2.derive_key(48, passphrase, + secure_vector<byte> master_key = pbkdf2.derive_key(48, passphrase, &salt[0], salt.size(), PBKDF2_ITERATIONS).bits_of(); @@ -55,12 +55,12 @@ int main() ) ); - outfile.write((const char*)salt.begin(), salt.size()); + outfile.write((const char*)&salt[0], salt.size()); pipe.start_msg(); infile >> pipe; pipe.end_msg(); - SecureVector<byte> hmac = pipe.read_all(1); - outfile.write((const char*)hmac.begin(), hmac.size()); + secure_vector<byte> hmac = pipe.read_all(1); + outfile.write((const char*)&hmac[0], hmac.size()); } |