搜索插件、代码仓与 APP 分类

插件详情v2.1.0

xxtea

XXTEA for Dart XXTEA 是一种快速且安全的加密算法。这是 Dart 的 XXTEA 库。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
1.5万
喜欢数
14
Pub 分数
130

安装插件

flutter pub add xxtea

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

XXTEA 是一种轻量级、快速且安全的加密算法,专为 Dart 实现。它提供了一个简单的接口,用于使用 XXTEA 密码对数据进行加密和解密,适用于需要高效对称加密的应用程序。该库支持多种平台,包括 Android、iOS、Web、macOS、Windows 和 Linux,确保跨平台兼容性。设计简洁且性能优异,非常适合在基于 Dart 的应用程序中保护中小型数据负载。

适合场景

  • 安全数据存储
  • 加密配置文件
  • 保护敏感用户数据
  • 跨平台加密
  • 简单的对称加密需要

主要特点

  • 快速加密和解密
  • 跨平台支持
  • 简单 API
  • 安全算法
  • 轻量级实现

适合对象

  • 移动应用开发者
  • Web应用程序安全
  • 桌面应用程序加密
  • Flutter 应用中的数据保护
  • 需要轻量级加密的应用程序

使用建议

  • 不适用于大数据流
  • 需要谨慎管理密钥
  • 最适合中小型数据大小
  • 不提供身份验证
  • 限制为对称加密

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

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 == decrypt_data)

所属分类

源码仓库

使用此插件的项目