No description
Find a file
2021-05-24 15:46:25 +08:00
test Moved src/xxtea.nim to xxtea.nim 2016-02-18 02:19:54 +08:00
.gitignore Initial commit 2016-02-17 08:40:53 +08:00
.travis.yml Import XXTEA for Nim 2016-02-18 02:06:38 +08:00
LICENSE.md Import XXTEA for Nim 2016-02-18 02:06:38 +08:00
README.md Update README 2016-02-18 03:04:44 +08:00
README_zh_CN.md Update README 2016-02-18 03:04:44 +08:00
xxtea.html Import XXTEA for Nim 2016-02-18 02:06:38 +08:00
xxtea.nim Off by one correction 2021-05-23 17:37:29 -03:00
xxtea.nimble update doc, increment version 2018-11-12 13:32:05 +01:00

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!"