diff options
author | lloyd <[email protected]> | 2008-10-08 03:15:34 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-10-08 03:15:34 +0000 |
commit | 8343194ea16297eb3e51627eb3f35c529850c6f8 (patch) | |
tree | 22aeac286d2cbbdbe8790b08e4187d369f3c4efb /doc/examples/ecdsa.cpp | |
parent | be5e48619a63559ad777396d69cc8cc95ef0af15 (diff) |
Update examples for recent API changes
Diffstat (limited to 'doc/examples/ecdsa.cpp')
-rw-r--r-- | doc/examples/ecdsa.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/doc/examples/ecdsa.cpp b/doc/examples/ecdsa.cpp index 1c1715f1b..83cdad967 100644 --- a/doc/examples/ecdsa.cpp +++ b/doc/examples/ecdsa.cpp @@ -8,13 +8,20 @@ using namespace Botan; int main() { - std::auto_ptr<RandomNumberGenerator> rng(RandomNumberGenerator::make_rng()); + try + { + std::auto_ptr<RandomNumberGenerator> rng( + RandomNumberGenerator::make_rng()); - EC_Domain_Params params = get_EC_Dom_Pars_by_oid("1.3.132.8"); + EC_Domain_Params params = get_EC_Dom_Pars_by_oid("1.3.132.8"); - std::cout << params.get_curve().get_p() << "\n"; - std::cout << params.get_order() << "\n"; - - ECDSA_PrivateKey ecdsa(*rng, params); + std::cout << params.get_curve().get_p() << "\n"; + std::cout << params.get_order() << "\n"; + ECDSA_PrivateKey ecdsa(*rng, params); + } + catch(std::exception& e) + { + std::cout << e.what() << "\n"; + } } |