kms_flutter 0.1.0

Flutter Android iOS

Key Management Service for Flutter applications. Supports Keystore (Android), Keychain (iOS / Mac OS X), and browsers.

Pub Package Github Actions CI

Overview #

This is an adapter for the package kms that uses:

  • Keystore in Android
  • Keychain in iOS and Mac OS X
  • BrowserKms in browsers

Currently the package uses the package flutter_secure_storage for storing the keys. We may transition to direct use of the underlying APIs in the future.

Getting started #

1.Add dependency #

dependencies:
  kms: ^0.4.0
  kms_flutter: ^0.1.0

2.Set Android minimum version #

Your android/app/build.gradle should have minimum SDK version 18 or above:

    defaultConfig {
        // ...
        minSdkVersion 18
        // ...
    }

3.Use #

import 'package:kms/kms';
import 'package:kms_flutter/kms_flutter';

final kms = flutterKms();

Future<void> main() async {
  // Create a key pair
  final document = kms.collection('examples').createKeyPair(
    keyExchangeType: null,
    signatureType: SignatureType.ed25519,
  );

  // Sign a document
  final signature = document.sign([1,2,3]);

  print('Signature: ${signature.bytes}');
  print('Public key: ${signature.publicKey.bytes}');
}
1
likes
90
pub points
45%
popularity

Key Management Service for Flutter applications. Supports Keystore (Android), Keychain (iOS / Mac OS X), and browsers.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

terrier989@gmail.com

License

Apache 2.0 (LICENSE)

Dependencies

collection, cryptography, flutter, flutter_secure_storage, kms, meta

More

Packages that depend on kms_flutter