xxtea 2.0.2

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 47

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);
print(encrypt_data)
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.

example/main.dart

library xxtea_test;

import 'package:xxtea/xxtea.dart';

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

Use this package as a library

1. Depend on it

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


dependencies:
  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
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
91
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
47
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7

Platforms

Detected platforms: Flutter, web, other

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

Health issues and suggestions

Document public APIs (-9.09 points)

10 out of 11 API elements (library, class, field or method) have no adequate dartdoc content. Good documentation improves code readability and discoverability through search.

Dependencies

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