File: test_botan_ecc.cpp

package info (click to toggle)
softhsm2 2.6.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,496 kB
  • sloc: cpp: 65,881; sh: 4,363; ansic: 2,018; makefile: 655
file content (15 lines) | stat: -rw-r--r-- 439 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <botan/ec_group.h>
#include <botan/oids.h>
int main()
{
        try {
                const std::string name("secp256r1");
                const Botan::OID oid(Botan::OIDS::lookup(name));
                const Botan::EC_Group ecg(oid);
                const std::vector<Botan::byte> der =
                    ecg.DER_encode(Botan::EC_DOMPAR_ENC_OID);
        } catch(...) {
                return 1;
        }
        return 0;
}