Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cKeyECDSA.h
Go to the documentation of this file.
1 //
4 //
5 
6 #ifndef _INC_cKeyECDSA_H
7 #define _INC_cKeyECDSA_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 #include "cKeyECPPair.h"
12 
13 namespace GrayLib
14 {
16 
17  class GRAYLIB_LINK cKeyECDSA : public cKeyECPPair // based on cKeyBase
18  {
21 
22  typedef cKeyECPPair SUPER_t;
23 
24  public:
25  cKeyECDSA() noexcept
26  {
27  }
28  virtual ~cKeyECDSA()
29  {
30  }
31 
32  virtual HRESULT MakeSignature(BYTE* pSig, SSL_Hash_TYPE eHashType, const BYTE* pHash, size_t nSizeHash, IRandomNoise* pRandom) const override;
33 
35  };
36 
38  {
41  typedef cKeyTypeDef SUPER_t;
42  public:
43  cKeyTypeECDSA() noexcept
44  : cKeyTypeDef(SSL_Key_ECDSA, "ECDSA")
45  {
46  }
47  virtual bool HasKeyType(SSL_Key_TYPE eKeyType) const noexcept
48  {
49  return eKeyType == SSL_Key_ECDSA ;
50  }
51  virtual cKeyBase* AllocKey() const
52  {
53  return new cKeyECDSA();
54  }
55  };
56 }
57 
58 #endif // _INC_cKeyECDSA_H
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
Definition: cKeyBase.h:56
Definition: cKeyECDSA.h:18
cKeyECDSA() noexcept
Definition: cKeyECDSA.h:25
virtual ~cKeyECDSA()
Definition: cKeyECDSA.h:28
UNITTEST_FRIEND(cKeyECDSA)
Definition: cKeyECPPair.h:24
Definition: cKeyTypeDef.h:22
Definition: cKeyECDSA.h:38
cKeyTypeECDSA() noexcept
Definition: cKeyECDSA.h:43
virtual bool HasKeyType(SSL_Key_TYPE eKeyType) const noexcept
Tell if the context implements this type (e.g. ECKEY can do ECDSA)
Definition: cKeyECDSA.h:47
virtual cKeyBase * AllocKey() const
Allocate a new context.
Definition: cKeyECDSA.h:51
Definition: cMesh.h:22
UNITTEST2_PREDEF(cQuadtree)
SSL_Key_TYPE
Definition: cKeyBase.h:24
@ SSL_Key_ECDSA
SSL_KeyExchange_ECDHE_ECDSA.
Definition: cKeyBase.h:32
SSL_Hash_TYPE
Definition: cHashCode.h:23
Definition: cRandom.h:19