aes_ctr 1.0.1 copy "aes_ctr: ^1.0.1" to clipboard
aes_ctr: ^1.0.1 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.

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);
}
3
likes
130
pub points
30%
popularity

Publisher

verified publisherwachasit.com

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on aes_ctr