monotone

monotone Mtn Source Tree

Root/botan/x509_key.h

1/*************************************************
2* X.509 Public Key Header File *
3* (C) 1999-2007 The Botan Project *
4*************************************************/
5
6#ifndef BOTAN_X509_PUBLIC_KEY_H__
7#define BOTAN_X509_PUBLIC_KEY_H__
8
9#include <botan/pipe.h>
10#include <botan/pk_keys.h>
11#include <botan/alg_id.h>
12
13namespace Botan {
14
15/*************************************************
16* X.509 Public Key Encoder *
17*************************************************/
18class X509_Encoder
19 {
20 public:
21 virtual AlgorithmIdentifier alg_id() const = 0;
22 virtual MemoryVector<byte> key_bits() const = 0;
23 virtual ~X509_Encoder() {}
24 };
25
26/*************************************************
27* X.509 Public Key Decoder *
28*************************************************/
29class X509_Decoder
30 {
31 public:
32 virtual void alg_id(const AlgorithmIdentifier&) = 0;
33 virtual void key_bits(const MemoryRegion<byte>&) = 0;
34 virtual ~X509_Decoder() {}
35 };
36
37namespace X509 {
38
39/*************************************************
40* X.509 Public Key Encoding/Decoding *
41*************************************************/
42void encode(const Public_Key&, Pipe&, X509_Encoding = PEM);
43std::string PEM_encode(const Public_Key&);
44
45Public_Key* load_key(DataSource&);
46Public_Key* load_key(const std::string&);
47Public_Key* load_key(const MemoryRegion<byte>&);
48
49Public_Key* copy_key(const Public_Key&);
50
51Key_Constraints find_constraints(const Public_Key&, Key_Constraints);
52
53}
54
55}
56
57#endif

Archive Download this file

Branches

Tags

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