openpgp 0.7.0 copy "openpgp: ^0.7.0" to clipboard
openpgp: ^0.7.0 copied to clipboard

outdated

library for use OpenPGP with support for android and ios

OpenPGP #

Library for use openPGP

Usage #

import 'package:openpgp/key_options.dart';
import 'package:openpgp/key_pair.dart';
import 'package:openpgp/openpgp.dart';
import 'package:openpgp/options.dart';

var keyPair = await OpenPGP.generate(
      options: Options(
        name: 'test',
        comment: 'test',
        email: 'test@test.com',
        passphrase: "123456",
        keyOptions: KeyOptions(
            rsaBits: 2048,
            cipher: Cypher.aes128,
            compression: Compression.none,
            hash: Hash.sha256,
            compressionLevel: 0,
        ),
      ),
);


var encrypted = await OpenPGP.encrypt("text","[publicKey here]");

var decrypted = await OpenPGP.decrypt("text encrypted","[privateKey here]","[passphrase here]");

var signed = await OpenPGP.sign("text","[publicKey here]","[privateKey here]","[passphrase here]");

var verified = await OpenPGP.verify("text signed","text","[publicKey here]");

var encryptedSymmetric = await OpenPGP.encryptSymmetric("text","[passphrase here]");

var decryptedSymmetric = await OpenPGP.decryptSymmetric("text encrypted","[passphrase here]");

ProGuard #

Add this lines to proguard-rules.pro for proguard support

-keep class go.** { *; }
-keep class openpgp.** { *; }

Sample #

Inside example folder

cd example && flutter run

Native Code #

the native library is made in Golang and build with gomobile for faster performance

https://github.com/jerson/openpgp-mobile

34
likes
0
pub points
86%
popularity

Publisher

verified publisherjerson.dev

library for use OpenPGP with support for android and ios

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on openpgp