aes_ctr 1.0.2 copy "aes_ctr: ^1.0.2" to clipboard
aes_ctr: ^1.0.2 copied to clipboard

AES block cipher algorithm CTR - Counter Mode, Supports all key sizes (128-bit, 192-bit and 256-bit) for Flutter (Android, iOS)

aes_ctr #

AES CTR - Counter Flutter plugin.

"Buy Me A Coffee"

Usage #

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);
}
copied to clipboard
3
likes
150
points
28
downloads

Publisher

verified publisherwachasit.com

Weekly Downloads

2024.07.08 - 2025.01.20

AES block cipher algorithm CTR - Counter Mode, Supports all key sizes (128-bit, 192-bit and 256-bit) for Flutter (Android, iOS)

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on aes_ctr