Need help with xxtea-c?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

xxtea
238 Stars 99 Forks MIT License 15 Commits 3 Opened issues

Description

XXTEA encryption algorithm library for C.

Services available

!
?

Need anything else?

Contributors list

XXTEA for C

XXTEA logo

Introduction

XXTEA is a fast and secure encryption algorithm. This is a XXTEA library for C.

It is different from the original XXTEA encryption algorithm. It encrypts and decrypts raw binary data instead of 32bit integer array, and the key is also the raw binary data.

Installation

git clone https://github.com/xxtea/xxtea-c.git
cmake .
make
make install

Usage

#include 
#include 
#include 

int main() { const char *text = "Hello World! 你好,中国!"; const char *key = "1234567890"; size_t len; unsigned char *encrypt_data = xxtea_encrypt(text, strlen(text), key, &len); char *decrypt_data = xxtea_decrypt(encrypt_data, len, key, &len); if (strncmp(text, decrypt_data, len) == 0) { printf("success!\n"); } else { printf("fail!\n"); } free(encrypt_data); free(decrypt_data); return 0; } </xxtea.h></string.h></stdio.h>

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.