Skip to content

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DIM Algorithm Plugins (Dart)

License PRs Welcome Platform Issues Repo Size Tags Version

Watchers Forks Stars Followers

Dependencies

  • Latest Versions
Name Version Description
Ming Ke Ming (名可名) Version Decentralized User Identity Authentication
Dao Ke Dao (道可道) Version Universal Message Module
DIMP (去中心化通讯协议) Version Decentralized Instant Messaging Protocol

Plugins

  1. Data Coding
    • Base-58
    • Base-64
    • Hex
    • UTF-8
    • JsON
    • PNF (Portable Network File)
    • TED (Transportable Encoded Data)
  2. Digest Digest
    • SHA-256
    • Keccak-256
    • RipeMD-160
  3. Cryptography
    • AES-256 (AES/CBC/PKCS7Padding)
    • RSA-1024 (RSA/ECB/PKCS1Padding), (SHA256withRSA)
    • ECC (Secp256k1)

Plugin Loader

import 'dart:typed_data';

import 'package:dimp/dimp.dart';
import 'package:dimap/dimap.dart';


class CommonPluginLoader extends PluginLoader {

  @override
  void registerBase64Coder() {

    /// Base64 coding
    Base64.coder = _PatchBase64Coder();

  }

}

/// Base-64
class _PatchBase64Coder extends Base64Coder {

  @override
  Uint8List? decode(String string) {
    string = trimBase64String(string);
    return super.decode(string);
  }

  static String trimBase64String(String b64) {
    if (b64.contains('\n')) {
      b64 = b64.replaceAll('\n', '');
      b64 = b64.replaceAll('\r', '');
      b64 = b64.replaceAll('\t', '');
      b64 = b64.replaceAll(' ', '');
    }
    return b64.trim();
  }
}

This library is primarily designed to implement various algorithms in a plug-in manner, allowing you to further develop additional algorithms tailored to your specific applications.


Copyright © 2023-2026 Albert Moky Followers

About

DIM Plugins (Dart)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages