?? des.h
字號(hào):
/*
* Header file for class of representing des algorithm
* Copyright (C) 2007 Stone
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Contact me by stoneyrh@163.com
*
*/
#ifndef DES_H
#define DES_H
#include "deskey.h"
#define DEFAULT_KEY 0XEB0AA5155328513BL
class des
{
public:
/*
* use DEFAULT_KEY as the key
*/
des(void);
/*
* spedify a key
*/
des(unsigned _int64 key);
~des(void);
/*
* set the key to another key
*/
void setkey(unsigned _int64 key);
/*
* encypt the data pointed by dpointer
* if succeed, return true, otherwise false
* count specifies how many unsigned _int64
* contained in the memory pointed by dpointer
* when return true, dpointer also point to the
* encrypted data
*/
bool encrypt(unsigned _int64* dpointer,unsigned _int64 count);
/*
* decypt the data pointed by dpointer
* if succeed, return true, otherwise false
* count specifies how many unsigned _int64
* contained in the memory pointed by dpointer
* when return true, dpointer also point to the
* decrypted data
*/
bool decrypt(unsigned _int64* dpointer,unsigned _int64 count);
private:
deskey dkey;
};
#endif
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -