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

📄 tea.h

📁 Tiny Encrytion Algorithm压缩速度快
💻 H
字号:
// The TEA encryption algorithm was invented by 
// David Wheeler & Roger Needham at Cambridge 
// University Computer Lab
//   http://www.cl.cam.ac.uk/ftp/papers/djw-rmn/djw-rmn-tea.html (1994)
//   http://www.cl.cam.ac.uk/ftp/users/djw3/xtea.ps (1997)
//   http://www.cl.cam.ac.uk/ftp/users/djw3/xxtea.ps (1998)
//
// This code was originally written in JavaScript by 
// Chris Veness at Movable Type Ltd
//   http://www.movable-type.co.uk
//
// It was adapted to C++ by Andreas Jonsson 
//   http://www.angelcode.com

#ifndef TEA_H
#define TEA_H

typedef unsigned int UINT;

// The length of the data should be at least 8 
// bytes, else the algorithm will not work.

// The key should be 128 bit, or 16 bytes

// The memory pointed to by data will be modified by 
// the functions.

int TeaEncrypt(UINT *data, UINT dataLen, UINT *key);
int TeaDecrypt(UINT *data, UINT dataLen, UINT *key);

#endif

⌨️ 快捷键说明

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