Interface IPasswordStorage
Defines a set of members that a type must implement to generate hashes from passwords that can be stored securely.
Namespace: TheXDS.MCART.Security
Assembly: MCART.Security.dll
Syntax
public interface IPasswordStorage
Properties
| Edit this page View SourceAlgId
Gets the algorithm name.
Declaration
string AlgId { get; }
Property Value
| Type | Description |
|---|---|
| string |
KeyLength
Gets the number of key bytes this instance will generate.
Declaration
int KeyLength { get; }
Property Value
| Type | Description |
|---|---|
| int |
Settings
Gets an object containing the algorithm configuration.
Declaration
object? Settings { get; }
Property Value
| Type | Description |
|---|---|
| object |
Methods
| Edit this page View SourceConfigureFrom(BinaryReader)
Obtains configuration from the specified block, advancing the reader by the number of bytes required by this instance's configuration.
Declaration
void ConfigureFrom(BinaryReader reader)
Parameters
| Type | Name | Description |
|---|---|---|
| BinaryReader | reader | Object from which configuration values are read. |
DumpSettings()
Writes configuration values in binary format.
Declaration
byte[] DumpSettings()
Returns
| Type | Description |
|---|---|
| byte[] | A byte array that can be used to reconstruct the key‑derivation configuration for this instance. |
Generate(byte[])
Generates a binary blob that can be stored in a database.
Declaration
byte[] Generate(byte[] input)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | input | Password from which to derive a key. |
Returns
| Type | Description |
|---|---|
| byte[] | A byte array containing the key derived from the specified password. |
Generate(SecureString)
Generates a binary blob that can be stored in a database.
Declaration
byte[] Generate(SecureString input)
Parameters
| Type | Name | Description |
|---|---|---|
| SecureString | input | Password from which to derive a key. |
Returns
| Type | Description |
|---|---|
| byte[] | A byte array containing the key derived from the specified password. |