blob: a8166059747b67db513d484d97b52981913dac16 (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
/*
* EAC CVC Public Key
* (C) 2008 FlexSecure Gmbh
* Falko Strenzke
*
* Distributed under the terms of the Botan license
*/
#ifndef BOTAN_EAC1_1_CVC_PUBLIC_KEY_H__
#define BOTAN_EAC1_1_CVC_PUBLIC_KEY_H__
#include <botan/pipe.h>
#include <botan/pk_keys.h>
#include <botan/alg_id.h>
namespace Botan {
/**
* This class represents EAC 1.1 CVC public key encoders.
*/
class BOTAN_DLL EAC1_1_CVC_Encoder
{
public:
/**
* Get the DER encoded CVC public key.
* @param alg_id the algorithm identifier to use in the encoding
* @return the DER encoded public key
*/
virtual MemoryVector<byte>
public_key(const AlgorithmIdentifier& enc) const = 0;
virtual ~EAC1_1_CVC_Encoder() {}
};
/**
* This class represents EAC 1.1 CVC public key decoders.
*/
class BOTAN_DLL EAC1_1_CVC_Decoder
{
public:
/**
* Decode a CVC public key.
* @param enc the DER encoded public key to decode
* @return the algorithm identifier found in the encoded public key
*/
virtual AlgorithmIdentifier const
public_key(const MemoryRegion<byte>& enc) = 0;
virtual ~EAC1_1_CVC_Decoder() {}
};
}
#endif
|