EnvPepperProvider class

Reads the pepper from an environment variable.

⚠️ Requires dart:io — NOT available on Web. For Web, use MemoryPepperProvider or a custom HTTP-based provider.

Example:

// Set env var: PASSWORD_GUARD_PEPPER=your-secret-pepper
final provider = EnvPepperProvider();
final pepper = await provider.getPepper();

Custom key:

final provider = EnvPepperProvider(key: 'APP_SECRET_PEPPER');
Implemented types

Constructors

EnvPepperProvider({String key = 'PASSWORD_GUARD_PEPPER'})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
key String
The environment variable name to read from.
final
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