kms_flutter 0.1.0 copy "kms_flutter: ^0.1.0" to clipboard
kms_flutter: ^0.1.0 copied to clipboard

unlisted

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}');
}
2
likes
30
pub points
0%
popularity

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

License

Apache-2.0 (LICENSE)

Dependencies

collection, cryptography, flutter, flutter_secure_storage, kms, meta

More

Packages that depend on kms_flutter