quick_native_crypto 0.0.1 copy "quick_native_crypto: ^0.0.1" to clipboard
quick_native_crypto: ^0.0.1 copied to clipboard

outdated

A Flutter plugin for native crypto APIs.

pub package

iOS Android macOS

Usage #

///
/// Encrypts [plaintext] using AES-GCM based on [key] and [nonce].
///
/// Valid key lengths are 128, 192, or 256 bits.
/// Returns a [SealedBox] containing a [ciphertext] and a [mac].
Future<SealedBox> aesEncrypt(
    {required Uint8List plaintext,
    required Uint8List key,
    required Uint8List nonce});

///
/// Decrypts [ciphertext] with AES-GCM based on [key], [nonce] and [mac].
///
/// Valid key lengths are 128, 192, or 256 bits.
/// Returns a [Uint8List] as decrypted data.
Future<Uint8List> aesDecrypt(
    {required Uint8List ciphertext,
    required Uint8List key,
    required Uint8List nonce,
    required Uint8List mac});
final plugin = QuickNativeCrypto();

var sealedBox = await plugin.aesEncrypt(...);
var plaintext = await plugin.aesDecrypt(...);
0
likes
0
points
28
downloads

Publisher

verified publisherflutter-cavalry.com

Weekly Downloads

A Flutter plugin for native crypto APIs.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on quick_native_crypto