xxtea

XXTEA encryption algorithm library written in pure Nim.

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version Unknown
License MIT
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:24

Installation

nimble install xxtea
choosenim install xxtea
git clone https://github.com/xxtea/xxtea-nim

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
xxtea - - - - - - -

Source

Repository https://github.com/xxtea/xxtea-nim
Homepage https://github.com/xxtea/xxtea-nim
Registry Source nimble_official

README

XXTEA for Nim

XXTEA logo

Build Status

Introduction

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

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

nimble install https://github.com/xxtea/xxtea-nim.git

Usage

import xxtea

const text = "Hello World! 你好,中国!"
const key = "1234567890"
const encrypt_data = xxtea.encrypt(text, key)
const decrypt_data = xxtea.decrypt(encrypt_data, key)
if text == decrypt_data:
    echo "success!"
else:
    echo "fail!"