diff options
author | lloyd <[email protected]> | 2008-09-05 12:49:05 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-05 12:49:05 +0000 |
commit | a10b1c70bcbdc8b1f2978928a58b60a3aa2ffa2c (patch) | |
tree | 732862d6950a8ed86debedb01b7c8142844373fa /doc | |
parent | 3bac1d990af53d6646f768a2b47d5b18d933fea2 (diff) | |
parent | e292d9c1263fc74c26b26b9bd6f879ab25cc19ee (diff) |
propagate from branch 'net.randombit.botan' (head 6af2a53b621670d7f0a7f0dc5db05c21475ec87b)
to branch 'net.randombit.botan.ecdsa' (head 615b9b32d55f374b935f9b9bfb4049dfad765e6c)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/dsa_kgen.cpp | 4 | ||||
-rw-r--r-- | doc/examples/xor_ciph.cpp | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/doc/examples/dsa_kgen.cpp b/doc/examples/dsa_kgen.cpp index 2a66d90a3..258ad6cf6 100644 --- a/doc/examples/dsa_kgen.cpp +++ b/doc/examples/dsa_kgen.cpp @@ -47,7 +47,9 @@ int main(int argc, char* argv[]) std::auto_ptr<RandomNumberGenerator> rng( RandomNumberGenerator::make_rng()); - DSA_PrivateKey key(*rng, DL_Group("dsa/jce/1024")); + DL_Group group(*rng, DL_Group::DSA_Kosherizer, 2048, 256); + + DSA_PrivateKey key(*rng, group); pub << X509::PEM_encode(key); if(argc == 1) diff --git a/doc/examples/xor_ciph.cpp b/doc/examples/xor_ciph.cpp index b9e46d91c..496d23323 100644 --- a/doc/examples/xor_ciph.cpp +++ b/doc/examples/xor_ciph.cpp @@ -13,6 +13,8 @@ using namespace Botan; class XOR_Cipher : public StreamCipher { public: + void clear() throw() { mask.destroy(); mask_pos = 0; } + // what we want to call this cipher std::string name() const { return "XOR"; } @@ -51,12 +53,12 @@ void XOR_Cipher::key(const byte key[], u32bit length) #include <botan/look_add.h> #include <botan/lookup.h> #include <botan/filters.h> -#include <botan/config.h> +#include <botan/libstate.h> int main() { add_algorithm(new XOR_Cipher); // make it available to use - global_config().add_alias("Vernam", "XOR"); // make Vernam an alias for XOR + global_state().add_alias("Vernam", "XOR"); // make Vernam an alias for XOR // a hex key value SymmetricKey key("010203040506070809101112AAFF"); |