Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xxtea/xxtea-as3

XXTEA encryption algorithm library for ActionScript 3.
https://github.com/xxtea/xxtea-as3

Last synced: 3 months ago
JSON representation

XXTEA encryption algorithm library for ActionScript 3.

Awesome Lists containing this project

README

        

# XXTEA for ActionScript 3


XXTEA logo

## Introduction

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

It is different from the original XXTEA encryption algorithm. It encrypts and decrypts ByteArray(String) instead of int or uint Array, and the key is also ByteArray(String).

## Usage

```actionscript
import org.xxtea.XXTEA;

var str:String = "Hello World! 你好,中国🇨🇳!";
var key:String = "1234567890";
var encrypt_data:String = XXTEA.encryptToString(str, key);
trace(encrypt_data);
var decrypt_data:String = XXTEA.decryptToString(encrypt_data, key);
trace(str == decrypt_data);
```