diff options
author | lloyd <[email protected]> | 2010-10-13 16:33:20 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-10-13 16:33:20 +0000 |
commit | b502cefaf0f9396354d58c4c18a78ac7870f6168 (patch) | |
tree | 8e4d699bd47bcdecaa6c3b670e19743d52047bb8 /doc | |
parent | fc4c8f57baa06cfc9073ce83a5e3d1547bea86c0 (diff) | |
parent | a142500346e9bef5c4b0905103eac9a494d6822e (diff) |
propagate from branch 'net.randombit.botan' (head cba32f885eb7889a9711cbee120df42839deb9d0)
to branch 'net.randombit.botan.c++0x' (head 7cb9cdfda0f3dedab24f1d3bc7e7ea9b22164234)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/new_engine.cpp | 6 | ||||
-rw-r--r-- | doc/examples/package.cpp | 4 | ||||
-rw-r--r-- | doc/examples/tls_client.cpp | 4 | ||||
-rw-r--r-- | doc/examples/tls_server.cpp | 4 | ||||
-rw-r--r-- | doc/log.txt | 7 |
5 files changed, 16 insertions, 9 deletions
diff --git a/doc/examples/new_engine.cpp b/doc/examples/new_engine.cpp index 6c7bc340a..ed4abf4d2 100644 --- a/doc/examples/new_engine.cpp +++ b/doc/examples/new_engine.cpp @@ -23,16 +23,16 @@ class XOR_Cipher : public StreamCipher XOR_Cipher() : StreamCipher(1, 32) { mask_pos = 0; } private: - void cipher(const byte in[], byte out[], u32bit length) + void cipher(const byte in[], byte out[], size_t length) { - for(u32bit j = 0; j != length; j++) + for(size_t j = 0; j != length; j++) { out[j] = in[j] ^ mask[mask_pos]; mask_pos = (mask_pos + 1) % mask.size(); } } - void key_schedule(const byte key[], u32bit length) + void key_schedule(const byte key[], size_t length) { mask.set(key, length); } diff --git a/doc/examples/package.cpp b/doc/examples/package.cpp index b907ac3ae..38a2e1666 100644 --- a/doc/examples/package.cpp +++ b/doc/examples/package.cpp @@ -51,13 +51,13 @@ int main(int argc, char* argv[]) BlockCipher* cipher = new Serpent; std::vector<byte> input = slurp_file(argv[1]); - std::vector<byte> output(input.size() + cipher->BLOCK_SIZE); + std::vector<byte> output(input.size() + cipher->block_size()); aont_package(rng, new Serpent, &input[0], input.size(), &output[0]); - std::vector<byte> unpackage_output(output.size() - cipher->BLOCK_SIZE); + std::vector<byte> unpackage_output(output.size() - cipher->block_size()); aont_unpackage(new Serpent, &output[0], output.size(), diff --git a/doc/examples/tls_client.cpp b/doc/examples/tls_client.cpp index 26e93dd2f..c17ffe4da 100644 --- a/doc/examples/tls_client.cpp +++ b/doc/examples/tls_client.cpp @@ -37,7 +37,9 @@ int main(int argc, char* argv[]) std::auto_ptr<Botan::RandomNumberGenerator> rng( Botan::RandomNumberGenerator::make_rng()); - TLS_Client tls(*rng, sock); + TLS_Policy policy; + + TLS_Client tls(policy, *rng, sock); printf("Handshake extablished...\n"); diff --git a/doc/examples/tls_server.cpp b/doc/examples/tls_server.cpp index ff4265937..e45a24759 100644 --- a/doc/examples/tls_server.cpp +++ b/doc/examples/tls_server.cpp @@ -44,6 +44,8 @@ int main(int argc, char* argv[]) Unix_Server_Socket listener(port); + TLS_Policy policy; + while(true) { try { @@ -53,7 +55,7 @@ int main(int argc, char* argv[]) printf("Got new connection\n"); - TLS_Server tls(rng, *sock, cert, key); + TLS_Server tls(policy, rng, *sock, cert, key); std::string hostname = tls.requested_hostname(); diff --git a/doc/log.txt b/doc/log.txt index 15904cd00..382ccd8d4 100644 --- a/doc/log.txt +++ b/doc/log.txt @@ -6,10 +6,13 @@ - Add hex encoding/decoding functions that can be used without a Pipe - Add support for dynamic engine loading on Windows - Allow using PBKDF2 with empty passphrases + - Switch default PKCS #8 encryption algorithm from AES-128 to AES-256 + - Support use of HMAC(SHA-256) and CMAC(Blowfish) in passhash9 + - Use size_t instead of u32bit for length fields + - Replace BlockCipher::BLOCK_SIZE attribute with function block_size() + - Replace HashFunction::HASH_BLOCK_SIZE attribute with hash_block_size() - Changed semantics of MemoryRegion::resize and clear to match STL - Removed MemoryRegion::append, replaced by push_back and operator+= - - Support use of HMAC(SHA-256) and CMAC(Blowfish) in passhash9 - - Switch default PKCS #8 encryption algorithm from AES-128 to AES-256 - Improve support for Intel Atom processors - Fix compilation under Sun Studio |