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

插件详情v3.0.8

crypto

SHA、MD5 和 HMAC 加密函数的实现。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
1760万
喜欢数
1900
Pub 分数
160

安装插件

flutter pub add crypto

插件介绍

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

crypto 包为 Dart 提供了广泛使用的加密函数实现,包括 SHA、MD5 和 HMAC 算法。该包专为安全数据处理而设计,使开发者能够对数据进行哈希运算、生成消息认证码,并在多个平台上确保数据完整性。该包由 Dart 团队维护,并可无缝集成到 Flutter 应用中。它支持所有主要平台:Android、iOS、Web、macOS、Windows 和 Linux,非常适合跨平台安全需求。

适合场景

  • 数据哈希用于完整性检查
  • 使用加盐哈希的安全密码存储
  • 为API身份验证生成HMAC签名
  • 在存储前对敏感数据进行加密
  • 验证数字签名
  • 实现安全会话令牌

主要特点

  • 支持 SHA-1、SHA-256、SHA-384、SHA-512
  • 提供 MD5 哈希(用于向后兼容)
  • 使用任意哈希函数的 HMAC 实现
  • 跨平台兼容性
  • 轻便且维护良好
  • 简单、一致的 API

适合对象

  • 需要数据完整性验证的应用程序
  • 需要安全哈希的后端服务
  • 处理用户凭据的移动应用
  • 强制执行安全通信的Web应用程序
  • 开发身份验证系统的开发者

使用建议

  • MD5 在密码学上较弱;在安全关键用途中应避免使用
  • SHA-1 已弃用;建议使用 SHA-256 或更高版本
  • 不适用于完整加密——请使用专用加密库
  • 需要仔细管理密钥以使用HMAC
  • 仅限哈希和MAC操作,不包括完整密码套件

原始 README

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

Overview

This repository is home to various Dart packages under the dart.dev publisher.

Packages

Package Description Issues Version
args Library for defining parsers for parsing raw command-line arguments into a set of options and values using GNU and POSIX style options. issues pub package
async Utility functions and classes related to the 'dart:async' library. issues pub package
characters String replacement with operations that are Unicode/grapheme cluster aware. issues pub package
collection Collections and utilities functions and classes related to collections. issues pub package
convert Utilities for converting between data representations. Provides a number of Sink, Codec, Decoder, and Encoder types. issues pub package
crypto Implementations of SHA, MD5, and HMAC cryptographic functions. issues pub package
fixnum Library for 32- and 64-bit signed fixed-width integers with consistent behavior between native and JS runtimes. issues pub package
lints Official Dart lint rules. Defines the 'core' and 'recommended' set of lints suggested by the Dart team. issues pub package
logging Provides APIs for debugging and error logging, similar to loggers in other languages, such as the Closure JS Logger and java.util.logging.Logger. issues pub package
os_detect Platform independent OS detection. issues pub package
path A string-based path manipulation library. issues pub package
platform A pluggable, mockable platform information abstraction for Dart. issues pub package
typed_data Utility functions and classes related to the dart:typed_data library. issues pub package

Publishing automation

For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

For additional information about contributing, see our contributing page.

所属分类

源码仓库

使用此插件的项目

所在榜单