SecureStorageProvider class

Implementation of SecurityProvider using flutter_secure_storage.

Uses platform-specific secure storage mechanisms:

  • iOS: Keychain
  • Android: EncryptedSharedPreferences
  • Web: Not supported (throws UnsupportedError)
  • Desktop: Platform-specific secure storage

Constructors

SecureStorageProvider()

Properties

hashCode int
The hash code for this object.
no setterinherited
isSupported bool
Whether secure storage is supported on the current platform.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

deleteEncryptionKey() Future<void>
Deletes the encryption key from secure storage.
generateAndStoreKey() Future<String>
Generates and stores a new encryption key.
getEncryptionKey() Future<String?>
Retrieves the encryption key from secure storage.
hasEncryptionKey() Future<bool>
Checks if an encryption key exists in secure storage.
initialize() Future<void>
Initializes the security provider.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setEncryptionKey(String key) Future<void>
Stores an encryption key in secure storage.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited