xxtea 2.0.2

  • README.md
  • Example
  • Installing
  • Versions
  • 83

XXTEA for Dart #

XXTEA logo

Build Status Pub

Introduction #

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

It is different from the original XXTEA encryption algorithm. It encrypts and decrypts String/Uint8List instead of uint32 array, and the key is also String/Uint8List.

Usage #

import 'package:xxtea/xxtea.dart';

String str = "Hello World! 你好,中国🇨🇳!";
String key = "1234567890";
String encrypt_data = xxtea.encryptToString(str, key);
String decrypt_data = xxtea.decryptToString(encrypt_data, key);
print(str == encrypt_data)

2.0.2 #

  • Updated description.

2.0.1 #

  • Added example.
  • Added CHANGELOG.md.
  • Updated description.
  • Formatted lib/xxtea.dart.

2.0.0 #

  • Changed the static XXTEA class to a normal class.
  • Added const xxtea.
  • Added xxteaEncrypt, xxteaDecrypt, xxteaEncryptToString, xxteaDecryptToString.
  • Fixed compatibility with Dart 2.

1.0.0 #

  • Initial Open Source release.


library xxtea_test;

import 'package:xxtea/xxtea.dart';

void main() {
  String str = "Hello World! 你好,中国🇨🇳!";
  String key = "1234567890";
  String encrypt_data = xxtea.encryptToString(str, key);
  String decrypt_data = xxtea.decryptToString(encrypt_data, key);

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  xxtea: ^2.0.2

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:xxtea/xxtea.dart';
Version Uploaded Documentation Archive
2.0.2 Nov 17, 2018 Go to the documentation of xxtea 2.0.2 Download xxtea 2.0.2 archive
2.0.1 Nov 17, 2018 Go to the documentation of xxtea 2.0.1 Download xxtea 2.0.1 archive
2.0.0 Nov 16, 2018 Go to the documentation of xxtea 2.0.0 Download xxtea 2.0.0 archive
1.0.0 Feb 13, 2016 Go to the documentation of xxtea 1.0.0 Download xxtea 1.0.0 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Apr 22, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:xxtea/xxtea.dart.

Health suggestions

Fix lib/xxtea.dart. (-0.50 points)

Analysis of lib/xxtea.dart reported 1 hint:

line 1 col 1: Prefer using /// for doc comments.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
Dev dependencies
test any