Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prongbang/aes_ctr
AES CTR - Counter Flutter plugin.
https://github.com/prongbang/aes_ctr
aes-ctr aes-ctr-mode cryptography decryption encryption flutter
Last synced: 24 days ago
JSON representation
AES CTR - Counter Flutter plugin.
- Host: GitHub
- URL: https://github.com/prongbang/aes_ctr
- Owner: prongbang
- License: mit
- Created: 2020-10-09T04:53:26.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-23T13:15:41.000Z (4 months ago)
- Last Synced: 2024-10-04T05:41:19.924Z (about 1 month ago)
- Topics: aes-ctr, aes-ctr-mode, cryptography, decryption, encryption, flutter
- Language: Dart
- Homepage:
- Size: 77.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# aes_ctr
AES CTR - Counter Flutter plugin.
[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/prongbang)
## Usage
```dart
import 'dart:async';
import 'dart:typed_data';
import 'package:aes_ctr/aes_ctr.dart';void main() async {
var plaintext = "aes ctr - counter";int counter = 5;
// 128-bit = (16 bytes * 8 bits/byte), 192-bit and 256-bit secretKey
Uint8List secretKey = Uint8List.fromList([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]);
var cipher = await AesCtrCryptography.encrypt(counter, secretKey, plaintext);
var decrypt = await AesCtrCryptography.decrypt(counter, secretKey, cipher);
print(decrypt);
}
```