6 #ifndef _INC_cKeyRSA1_H
7 #define _INC_cKeyRSA1_H
12 #include "../GrayLibBase.h"
13 #include "../Math/cBigUnsigned.h"
75 bool IsValidKey()
const;
84 void GenerateKeys(OUT VAL_t& d,
const VAL_t& p,
const VAL_t& q);
85 void GenerateKeys(
BIT_ENUM_t nBits, OUT VAL_t& d, OUT VAL_t* pP =
nullptr, OUT VAL_t* pQ=
nullptr);
87 VAL_t EncryptDecrypt(
const VAL_t& source)
const;
94 HRESULT LoadKeyFile(
const FILECHAR_t* pszFileName,
const char* pszName =
nullptr);
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
Definition: cASNReader.h:22
Definition: cASNWriterRev.h:22
Definition: cBigUnsigned.h:22
Definition: cKeyRSA1.h:27
VAL_t m_E
exponent of the key (public or private half of the key depending on use.)
Definition: cKeyRSA1.h:68
void SetCopyKey(const cKeyRSA1 &src)
Definition: cKeyRSA1.h:78
VAL_t m_N
modulus of the key (usually public) = multiplication of the 2 primes (pq).
Definition: cKeyRSA1.h:67
cBigUnsigned VAL_t
Definition: cKeyRSA1.h:64
UNITTEST_FRIEND(cKeyRSA1)
UNITTEST2_PREDEF(cQuadtree)
unsigned int BIT_ENUM_t
Enumerate number of bits or address a single bit in some array of bits.
Definition: cBits.h:20
char FILECHAR_t
a UTF8 char in a file name. like TCHAR
Definition: FileName.h:22
Definition: cDebugAssert.h:29