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

Hive-backed WrapStore implementation for nemo_crypto.

example/example.dart

import 'package:hive_ce/hive.dart';
import 'package:nemo_crypto/nemo_crypto.dart';
import 'package:nemo_crypto_hive/nemo_crypto_hive.dart';

void main() async {
  await SodiumProvider.init();

  // 1. Initialize Hive (In a real app, provide a path via Hive.initFlutter())
  Hive.init('./hive_data');
  final box = await Hive.openBox<dynamic>('crypto_metadata');

  // 2. Plug the Hive box into the Keyring architecture
  final store = HiveWrapStore(box);
  final keyring = Keyring(store);

  // 3. Initialize the keyring state
  await keyring.init();

  if (keyring.status == NemoStatus.none) {
    print('Store is empty. Ready for keyring.create()');
  } else {
    print('Store exists. Ready for keyring.unlockWithPassphrase()');
  }
}
1
likes
160
points
78
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Hive-backed WrapStore implementation for nemo_crypto.

Repository (GitHub)
View/report issues
Contributing

Topics

#hive #storage #security #encryption #e2ee

License

MIT (license)

Dependencies

hive_ce, nemo_crypto

More

Packages that depend on nemo_crypto_hive