1
0
mirror of https://github.com/fumiama/simple-crypto.git synced 2026-06-05 18:10:23 +08:00
Go to file
2021-12-11 17:48:57 +08:00
2021-05-29 13:58:23 +08:00
2021-12-11 17:36:08 +08:00
2021-12-11 17:42:40 +08:00
2021-12-11 17:48:57 +08:00
2021-12-11 17:48:57 +08:00
2021-12-11 17:48:57 +08:00

simple-crypto

Simple C lib of the MD5 & TEA algorithm

Install

git clone https://github.com/fumiama/simple-crypto.git
cd simple-crypto
mkdir build
cd build
cmake ..
make
make install

Usage

  1. Include simplecrypto.h in your c program.
#include <simplecrypto.h>
  1. Call functions. Don't forget to free the returned digest.
uint8_t* md5(const uint8_t *data, size_t data_len);

TEADAT* tea_encrypt_qq(const TEA t[4], const TEADAT* src);
TEADAT* tea_encrypt(const TEA t[4], const uint32_t sumtable[0x10], const TEADAT* src);
TEADAT* tea_encrypt_native_endian(const TEA t[4], const uint32_t sumtable[0x10], const TEADAT* src);
TEADAT* tea_decrypt_qq(const TEA t[4], const TEADAT* src);
TEADAT* tea_decrypt(const TEA t[4], const uint32_t sumtable[0x10], const TEADAT* src);
TEADAT* tea_decrypt_native_endian(const TEA t[4], const uint32_t sumtable[0x10], const TEADAT* src);
Description
A simple c lib to calc md5, tea.
Readme 86 KiB
Languages
C 96.2%
CMake 3.8%