dimap 2.1.0
dimap: ^2.1.0 copied to clipboard
DIM Algorithm Plugins
DIM Algorithm Plugins (Dart) #
Dependencies #
- Latest Versions
| Name | Version | Description |
|---|---|---|
| Ming Ke Ming (名可名) | Decentralized User Identity Authentication | |
| Dao Ke Dao (道可道) | Universal Message Module | |
| DIMP (去中心化通讯协议) | Decentralized Instant Messaging Protocol |
Plugins #
- Data Coding
- Base-58
- Base-64
- Hex
- UTF-8
- JsON
- PNF (Portable Network File)
- TED (Transportable Encoded Data)
- Digest Digest
- SHA-256
- Keccak-256
- RipeMD-160
- 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.