monotone

monotone Mtn Source Tree

Root/botan/x509_key.h

1/*************************************************
2* X.509 Public Key Header File *
3* (C) 1999-2005 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
12namespace Botan {
13
14/*************************************************
15* X.509 Public Key *
16*************************************************/
17class X509_PublicKey : public virtual PK_Key
18 {
19 public:
20 u64bit key_id() const;
21 virtual MemoryVector<byte> DER_encode_pub() const = 0;
22 virtual MemoryVector<byte> DER_encode_params() const = 0;
23 virtual void BER_decode_pub(DataSource&) = 0;
24 virtual void BER_decode_params(DataSource&) = 0;
25 virtual ~X509_PublicKey() {}
26 };
27
28namespace X509 {
29
30/*************************************************
31* X.509 Public Key Encoding/Decoding *
32*************************************************/
33void encode(const X509_PublicKey&, Pipe&, X509_Encoding = PEM);
34std::string PEM_encode(const X509_PublicKey&);
35
36X509_PublicKey* load_key(DataSource&);
37X509_PublicKey* load_key(const std::string&);
38X509_PublicKey* load_key(const MemoryRegion<byte>&);
39
40X509_PublicKey* copy_key(const X509_PublicKey&);
41
42Key_Constraints find_constraints(const X509_PublicKey&, Key_Constraints);
43
44}
45
46}
47
48#endif

Archive Download this file

Branches

Tags

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