⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 idea.h

📁 各种加密算法的源代码
💻 H
字号:
#ifndef IDEA_H
#define IDEA_H

#include "cryptlib.h"
#include "misc.h"

class IDEA : public BlockTransformation
{
public:
    IDEA(const byte *userKey, CipherDir dir);

    void ProcessBlock(byte * inoutBlock)
        {IDEA::ProcessBlock(inoutBlock, inoutBlock);}
    void ProcessBlock(const byte *inBlock, byte * outBlock);

    enum {KEYLENGTH=16, BLOCKSIZE=8};
    unsigned int BlockSize() const {return BLOCKSIZE;};

private:
    void EnKey(const byte *);
    void DeKey();
    SecBlock<word16> key;
};

class IDEAEncryption : public IDEA
{
public:
    IDEAEncryption(const byte * userKey)
        : IDEA (userKey, ENCRYPTION) {}
};

class IDEADecryption : public IDEA
{
public:
    IDEADecryption(const byte * userKey)
        : IDEA (userKey, DECRYPTION) {}
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -