xxtea 1.0.0
XXTEA for D.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
XXTEA for D
<a href="https://github.com/xxtea/">
<img src="https://avatars1.githubusercontent.com/u/6683159?v=3&s=86" alt="XXTEA logo" title="XXTEA" align="right" />
</a>
Introduction
XXTEA is a fast and secure encryption algorithm. This is a XXTEA library for D.
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.
Usage
This is a dub library (http://code.dlang.org/about). Just add dependancy to your package.json:
{
...
"dependencies": {
"xxtea": "~>1.0.0",
...
}
}
A simple source code example is in the provided app.d and looks like this:
import xxtea;
import std.stdio;
void main() {
auto text = "Hello World! 你好,中国!";
auto key = "1234567890";
auto encrypt_data = XXTEA.encryptToBase64(text, key);
writeln(encrypt_data);
auto decrypt_data = XXTEA.decryptFromBase64(encrypt_data, key);
assert(text == decrypt_data);
}
- Registered by Ma Bingyao
- 1.0.0 released 8 years ago
- xxtea/xxtea-d
- github.com/xxtea/xxtea-d
- MIT
- Copyright (c) 2008-2016 Ma Bingyao <[email protected]>
- Authors:
- Dependencies:
- none
- Versions:
-
1.0.0 2016-Feb-12 ~master 2016-Feb-12 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
57 downloads total
-
- Score:
- 0.7
- Short URL:
- xxtea.dub.pm