MemoryPepperProvider class
Stores the pepper in memory.
Useful for testing and for environments where the pepper is provided at app startup (e.g., loaded from a remote config, passed via constructor injection, etc.).
⚠️ In production servers, prefer EnvPepperProvider (dart:io only) or a custom secrets-manager provider.
Example:
final provider = MemoryPepperProvider('my-secret-pepper');
await PasswordGuard.hash(
password: 'myPassword',
pepperProvider: provider,
);
- Implemented types
Constructors
- MemoryPepperProvider(String pepper)
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getPepper(
) → Future< String> -
Returns the pepper value.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited