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

Cross-platform keyring package for Dart (umbrella API)

keyring #

Umbrella package for the Dart keyring ecosystem. Re-exports core types from keyring_core and provides a convenience top-level API that delegates to a lazily-initialized global defaultStore.

Quick Start #

import 'package:keyring/keyring.dart';

void main() async {
  final entry = KeyringEntry('my-app', 'alice');
  await setPassword(entry, 's3cret');
  final password = await getPassword(entry);
  print(password); // s3cret
}

Platform Selection #

defaultStore is initialized once on first access:

  • Web (dart2js / dart2wasm) — WebKeyringStore() (in-memory)
  • Native (VM, AOT) — NativeKeyringStore() (Rust FFI)

Override with setDefaultStore():

setDefaultStore(WebKeyringStore()); // force in-memory

Convenience API #

All top-level functions delegate to defaultStore:

Function Delegates to
setPassword(entry, password) defaultStore.setPassword
getPassword(entry) defaultStore.getPassword
setSecret(entry, secret) defaultStore.setSecret
getSecret(entry) defaultStore.getSecret
deleteCredential(entry) defaultStore.deleteCredential
getAttributes(entry) defaultStore.getAttributes
updateAttributes(entry, attrs) defaultStore.updateAttributes
buildEntry(service, user, {modifiers}) defaultStore.build
searchEntries(spec) defaultStore.search

Re-exports #

The package re-exports these types from keyring_core:

  • KeyringEntry
  • KeyringException
  • KeyringErrorType
  • CredentialPersistence
0
likes
160
points
6
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Cross-platform keyring package for Dart (umbrella API)

Repository (GitHub)
View/report issues

Topics

#keyring #credentials #security #secrets

License

MIT (license)

Dependencies

keyring_core, keyring_native, keyring_web

More

Packages that depend on keyring