パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.0.2

dart_des

このアルゴリズムは、DESおよびトリプルDESアルゴリズムの純粋なDart実装です。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
1.7万
いいね数
31
Pub ポイント
150

パッケージをインストール

flutter pub add dart_des

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

dart_des は、データ暗号化標準(DES)およびトリプルDES暗号化アルゴリズムの純粋なDart実装です。対称鍵暗号化を必要とするアプリケーションに適した、セキュアでプラットフォーム非依存の暗号操作を提供します。このパッケージは、Android、iOS、Web、macOS、Windows、Linuxなどすべての主要プラットフォームをサポートしており、レガシーまたは標準化された暗号化が必要なクロスプラットフォームアプリに最適です。ネイティブコードに依存しないため、環境間での一貫した動作が保証されます。外部依存性なしにDESベースの暗号化を実装したい開発者向けに設計されています。

用途

  • レガシーシステム統合
  • セキュアなデータ送信
  • オフラインアプリにおけるデータ保護
  • DES基準への準拠
  • DESベースのサービスとの相互運用性

主な機能

  • 純粋なDart実装
  • DESおよびトリプルDESをサポート
  • クロスプラットフォーム互換性
  • ネイティブな依存関係なし
  • 暗号化/復号のためのシンプルな API

適している対象

  • DES暗号化が必要な開発者
  • 後方互換性を必要とするアプリ
  • ネイティブコードを避けるプロジェクト
  • セキュリティを重視したFlutterアプリケーション
  • 標準DESアルゴリズムを使用するシステム

注意事項

  • DESは高セキュリティ要件において古くなったと見なされています
  • 3DESは現代の代替手段よりも遅い
  • 新しい高セキュリティプロジェクトには推奨されません
  • 鍵の管理には注意が必要です
  • 対称鍵暗号化に限定

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

dart_des

This algorithm is a pure dart implementation of the DES and Triple DES algorithms (port of pyDES). Triple DES is either DES-EDE3 with a 24 byte key, or DES-EDE2 with a 16 byte key.

Example
import 'dart:convert';

import 'package:convert/convert.dart';
import 'package:dart_des/dart_des.dart';

main() {
  String key = '12345678'; // 8-byte
  String message = 'Driving in from the edge of town';
  List<int> encrypted;
  List<int> decrypted;
  List<int> iv = [1, 2, 3, 4, 5, 6, 7, 8];

  print('key: $key');
  print('message: $message');

  DES desECB = DES(key: key.codeUnits, mode: DESMode.ECB);
  encrypted = desECB.encrypt(message.codeUnits);
  decrypted = desECB.decrypt(encrypted);
  print('DES mode: ECB');
  print('encrypted: $encrypted');
  print('encrypted (hex): ${hex.encode(encrypted)}');
  print('encrypted (base64): ${base64.encode(encrypted)}');
  print('decrypted: $decrypted');
  print('decrypted (hex): ${hex.encode(decrypted)}');
  print('decrypted (utf8): ${utf8.decode(decrypted)}');

  key = '123456781234567812345678'; // 24-byte
  DES3 des3CBC = DES3(key: key.codeUnits, mode: DESMode.CBC, iv: iv);
  encrypted = des3CBC.encrypt(message.codeUnits);
  decrypted = des3CBC.decrypt(encrypted);
  print('Triple DES mode: CBC');
  print('encrypted: $encrypted');
  print('encrypted (hex): ${hex.encode(encrypted)}');
  print('encrypted (base64): ${base64.encode(encrypted)}');
  print('decrypted: $decrypted');
  print('decrypted (hex): ${hex.encode(decrypted)}');
  print('decrypted (utf8): ${utf8.decode(decrypted)}');
}

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト