aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/ecdsa.cpp
blob: 1c1715f1bd8f80140339508d61852a4565006594 (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/ecdsa.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);

   }