Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zonble/simple_rc4_dart
Yet another RC4 cryptor that encodes/decodes bytes and UTF8 strings.
https://github.com/zonble/simple_rc4_dart
dart rc4 rc4-algorithm
Last synced: 23 days ago
JSON representation
Yet another RC4 cryptor that encodes/decodes bytes and UTF8 strings.
- Host: GitHub
- URL: https://github.com/zonble/simple_rc4_dart
- Owner: zonble
- License: mit
- Created: 2018-07-17T15:30:12.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-28T20:28:27.000Z (almost 2 years ago)
- Last Synced: 2024-10-14T09:27:42.777Z (23 days ago)
- Topics: dart, rc4, rc4-algorithm
- Language: Dart
- Homepage:
- Size: 25.4 KB
- Stars: 3
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# simple_rc4
[![Actions Status](https://github.com/zonble/simple_rc4_dart/workflows/Dart%20CI/badge.svg)](https://github.com/zonble/simple_rc4_dart/actions)
RC4 cryptor that encodes/decodes bytes and UTF8 strings.
Credit to https://github.com/zonble the original creator of this library.
The only difference: this handels mal formed list in decoding, by adding a default parameter {[bool](https://api.dart.dev/be/181224/dart-core/bool-class.html)? allowMalformed} to the decoding function that allows mal formed List to prevent FormatException: Unexpected extension byte...
## Usage
The package provides a simple class, [RC4], just create an instance of it with
your key, and then pass your data that you want to do encoding/decoding.A simple usage example:
```dart
import 'package:simple_rc4/simple_rc4.dart';main() {
RC4 rc4 = new RC4('zonble');
String input = '中文';
var bytes = rc4.encodeBytes(utf8.encode(input));
print(bytes);
}
```That's all! Enjoy!