aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/ecdsa.cpp
blob: 029a2956e96d6768ac490d4d3243f6a465a4b755 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <botan/botan.h>
#include <botan/ec.h>

#include <memory>
#include <iostream>

using namespace Botan;

int main()
   {
   std::auto_ptr<RandomNumberGenerator> rng(RandomNumberGenerator::make_rng());

   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);

   }