mirror of
https://github.com/XFox111/SimpleOTP.git
synced 2026-04-23 08:08:40 +03:00
Created OTPConfiguration (markdown)
@@ -0,0 +1,28 @@
|
||||
Namespace: `SimpleOTP.Models`
|
||||
|
||||
Assembly: `SimpleOTP.dll`
|
||||
|
||||
OTP generator configuration object.
|
||||
```csharp
|
||||
public record OTPConfiguration
|
||||
```
|
||||
|
||||
## Properties
|
||||
| Property | Type | Accessor | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `Id` | [Guid](https://docs.microsoft.com/en-us/dotnet/api/system.guid?view=net-5.0) | get/set | Gets or sets unique identifier of current configuration instance. [Default: [Guid.NewGuid()](https://docs.microsoft.com/en-us/dotnet/api/system.guid.newguid?view=net-5.0#System_Guid_NewGuid)] |
|
||||
| `Type` | [OTPType](https://github.com/XFox111/SimpleOTP/wiki/OTPType) | get/set | Gets or sets oTP algorithm type. |
|
||||
| `IssuerLabel` | `string` | get/set | Gets or sets name of config issuer/service. |
|
||||
| `AccountName` | `string` | get/set | Gets or sets username or email of current config. |
|
||||
| `Secret` | `string` | get/set | Gets or sets secret key for OTP code generation. |
|
||||
| `Issuer` | `string` | get/set | Gets or sets internal issuer name for additional identification. Currently should be the same with `IssuerLabel`. |
|
||||
| `Algorithm` | [Algorithm](https://github.com/XFox111/SimpleOTP/wiki/Algorithm) | get/set | Gets or sets OTP hashing algorithm. [Default: `Algorithm.SHA1`] |
|
||||
| `Digits` | `Int32` | get/set | Gets or sets number of digits of OTP code. [Default: `6`] |
|
||||
| `Counter` | `Int64` | get/set | Gets or sets counter for HOTP generation. Update each time password has been generated. HOTP only. [Default: `0`] |
|
||||
| `Period` | [TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/system.timespan?view=net-5.0) | get/set | Gets or sets time of OTP validity interval. Used to calculate TOTP counter. [Default: `TimeSpan.FromSeconds(30)`] |
|
||||
|
||||
## Methods
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
|
||||
TODO
|
||||
Reference in New Issue
Block a user