monotone

monotone Mtn Source Tree

Root/botan/pk_algs.cpp

1/*************************************************
2* PK Key Source File *
3* (C) 1999-2005 The Botan Project *
4*************************************************/
5
6#include <botan/pk_algs.h>
7#include <botan/rsa.h>
8
9namespace Botan {
10
11/*************************************************
12* Get an PK public key object *
13*************************************************/
14X509_PublicKey* get_public_key(const std::string& alg_name)
15 {
16 if(alg_name == "RSA") return new RSA_PublicKey;
17 else
18 return 0;
19 }
20
21/*************************************************
22* Get an PK private key object *
23*************************************************/
24PKCS8_PrivateKey* get_private_key(const std::string& alg_name)
25 {
26 if(alg_name == "RSA") return new RSA_PrivateKey;
27 else
28 return 0;
29 }
30
31}

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status