패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.0.2

dart_des

이 알고리즘은 DES 및 트리플 DES 알고리즘의 순수한 다트 구현입니다.

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 기반 서비스와의 상호 운용성

주요 기능

  • 순수한 다트 구현
  • DES 및 트리플 DES를 지원합니다
  • 크로스 플랫폼 호환성
  • 내장 종속성 없음
  • 암호화/복호화를 위한 간단한 API

적합한 대상

  • DES 암호화가 필요한 개발자
  • 뒤로 호환성 필요 앱
  • 네이티브 코드를 피하는 프로젝트
  • 보안 중심의 Flutter 애플리케이션
  • 표준 DES 알고리즘을 사용하는 시스템

고려 사항

  • 고보안 요구 사항에 대해 DES는 오래된 것으로 간주됩니다
  • 트리플 DES는 현대적인 대안보다 느립니다
  • 새로운 고보안 프로젝트에는 권장되지 않습니다
  • 신중한 키 관리가 필요합니다
  • 대칭 키 암호화에 제한됨

원본 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)}');
}

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트