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}');
}

Libraries

kms_flutter
Contains a Kms implementation for Flutter applications. [...]