aboutsummaryrefslogtreecommitdiffstats
path: root/src/pbe/pbes2
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-05-25 22:52:00 +0000
committerlloyd <[email protected]>2012-05-25 22:52:00 +0000
commit12090a7148d9ee73572cc1a7268fc489504a8173 (patch)
tree51e50ce0852c56231e9e6dc13f168b10edd45d01 /src/pbe/pbes2
parent9594979caf775dc4062850044715b804d1fda60c (diff)
parent65cc04445f8d40497f02a14bd8cb97081790e54b (diff)
propagate from branch 'net.randombit.botan.x509-path-validation' (head 63b5a20eab129ca13287fda33d2d02eec329708f)
to branch 'net.randombit.botan' (head 8b8150f09c55184f028f2929c4e7f7cd0d46d96e)
Diffstat (limited to 'src/pbe/pbes2')
-rw-r--r--src/pbe/pbes2/pbes2.cpp14
-rw-r--r--src/pbe/pbes2/pbes2.h4
2 files changed, 9 insertions, 9 deletions
diff --git a/src/pbe/pbes2/pbes2.cpp b/src/pbe/pbes2/pbes2.cpp
index 85afe6ffe..752a4fb6d 100644
--- a/src/pbe/pbes2/pbes2.cpp
+++ b/src/pbe/pbes2/pbes2.cpp
@@ -72,7 +72,7 @@ void PBE_PKCS5v20::flush_pipe(bool safe_to_skip)
if(safe_to_skip && pipe.remaining() < 64)
return;
- SecureVector<byte> buffer(DEFAULT_BUFFERSIZE);
+ secure_vector<byte> buffer(DEFAULT_BUFFERSIZE);
while(pipe.remaining())
{
size_t got = pipe.read(&buffer[0], buffer.size());
@@ -107,7 +107,7 @@ void PBE_PKCS5v20::new_params(RandomNumberGenerator& rng)
/*
* Encode PKCS#5 PBES2 parameters
*/
-MemoryVector<byte> PBE_PKCS5v20::encode_params() const
+std::vector<byte> PBE_PKCS5v20::encode_params() const
{
return DER_Encoder()
.start_cons(SEQUENCE)
@@ -119,18 +119,18 @@ MemoryVector<byte> PBE_PKCS5v20::encode_params() const
.encode(iterations)
.encode(key_length)
.end_cons()
- .get_contents()
+ .get_contents_unlocked()
)
)
.encode(
AlgorithmIdentifier(block_cipher->name() + "/CBC",
DER_Encoder()
.encode(iv, OCTET_STRING)
- .get_contents()
+ .get_contents_unlocked()
)
)
.end_cons()
- .get_contents();
+ .get_contents_unlocked();
}
/*
@@ -228,8 +228,8 @@ PBE_PKCS5v20::PBE_PKCS5v20(BlockCipher* cipher,
*/
PBE_PKCS5v20::PBE_PKCS5v20(DataSource& params) : direction(DECRYPTION)
{
- hash_function = 0;
- block_cipher = 0;
+ hash_function = nullptr;
+ block_cipher = nullptr;
decode_params(params);
}
diff --git a/src/pbe/pbes2/pbes2.h b/src/pbe/pbes2/pbes2.h
index 7b82980e5..5593c9091 100644
--- a/src/pbe/pbes2/pbes2.h
+++ b/src/pbe/pbes2/pbes2.h
@@ -49,7 +49,7 @@ class BOTAN_DLL PBE_PKCS5v20 : public PBE
private:
void set_key(const std::string&);
void new_params(RandomNumberGenerator& rng);
- MemoryVector<byte> encode_params() const;
+ std::vector<byte> encode_params() const;
void decode_params(DataSource&);
OID get_oid() const;
@@ -58,7 +58,7 @@ class BOTAN_DLL PBE_PKCS5v20 : public PBE
Cipher_Dir direction;
BlockCipher* block_cipher;
HashFunction* hash_function;
- SecureVector<byte> salt, key, iv;
+ secure_vector<byte> salt, key, iv;
size_t iterations, key_length;
Pipe pipe;
};