hillcode.h
来自「在VC环境下采用希尔密码体制加密、解密和破译。该软件实现了输入任意长度的密钥对文」· C头文件 代码 · 共 35 行
H
35 行
#ifndef __HILLCODE_H__
#define __HILLCODE_H__
#include "Matrix.h"
#include <STRING>
using std::string;
class CHillCode
{
public:
const long * GetDiscryptedKey() const;
void SetE(const unsigned char *pE, const int LEN);
void SetM(const unsigned char *pM, const int LEN);
const char * Discrypting();
void SetE(const unsigned char * pE);
void SetDiscryKey(const CMatrix &matrixDiscryKey);
const char * Encrypting();
CHillCode();
void SetM(const unsigned char *pM);
int SetEncryKey(const long * plMatrix, const int LEN);
~CHillCode();
CHillCode(const CHillCode &HillCode);
CHillCode & operator = (const CHillCode &HillCode);
protected:
private:
unsigned char * m_szM; //明文
unsigned char * m_szE; // 密文
int m_nLenM; // 明文长度
int m_nLenE; // 密文长度
CMatrix m_matrixEncryKey;
CMatrix m_matrixDiscryKey;
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?