blob: 83cdad967cac6132e8f8287b02aca9a724af3cf5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include <botan/botan.h>
#include <botan/ecdsa.h>
#include <memory>
#include <iostream>
using namespace Botan;
int main()
{
try
{
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);
}
catch(std::exception& e)
{
std::cout << e.what() << "\n";
}
}
|