keyring_web 1.0.0 copy "keyring_web: ^1.0.0" to clipboard
keyring_web: ^1.0.0 copied to clipboard

In-memory keyring store for testing and non-native environments

keyring_web #

Pure-Dart keyring implementation using an in-memory HashMap-backed store. Suitable for web platforms and testing where native secure storage is unavailable.

Note: This is an in-memory implementation. Data does not persist between process restarts.

Usage #

import 'package:keyring_core/keyring_core.dart';
import 'package:keyring_web/keyring_web.dart';

final store = WebKeyringStore();
final entry = KeyringEntry('my-app', 'alice');

await store.setPassword(entry, 's3cret');
print(await store.getPassword(entry)); // s3cret

Properties #

Property Value
vendor 'Web (in-memory)'
id 'keyring-web-1.0.0'
persistence CredentialPersistence.untilDelete

Testing #

This package includes 27 tests covering all KeyringStore operations, including edge cases for empty passwords, secret isolation between entries, and attribute merge semantics:

dart test

When to Use #

  • Web applications — the only option when running in a browser
  • Testing — lightweight, fast, no OS dependencies
  • Prototyping — swap in NativeKeyringStore when ready for production
0
likes
160
points
6
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

In-memory keyring store for testing and non-native environments

Repository (GitHub)
View/report issues

Topics

#keyring #credentials #testing #in-memory

License

MIT (license)

Dependencies

crypto, keyring_core

More

Packages that depend on keyring_web