mirror of
https://github.com/XFox111/SimpleOTP.git
synced 2026-04-23 08:08:40 +03:00
Created OTPConfiguration.GenerateConfiguration (markdown)
@@ -0,0 +1,27 @@
|
||||
Namespace: `SimpleOTP.Models`
|
||||
|
||||
Assembly: `SimpleOTP.dll`
|
||||
|
||||
Generate a new OTP configuration to send it to client.
|
||||
```csharp
|
||||
public static OTPConfiguration GenerateConfiguration(string issuer, string accountName);
|
||||
```
|
||||
### Parameters
|
||||
`issuer` `string`
|
||||
|
||||
Name of your application/service.
|
||||
|
||||
`accountName` `string`
|
||||
|
||||
Username/email of the user.
|
||||
|
||||
### Returns
|
||||
Valid `OTPConfiguration` configuraion.
|
||||
|
||||
### Remarks
|
||||
Default parameters for generated configuration:
|
||||
- OTP algorithm: Time-based OTP
|
||||
- Key length: 160 bit (20 characters)
|
||||
- Hashing algorithm: HMAC-SHA-1
|
||||
- OTP length: 6 digits
|
||||
- Period: 30 seconds
|
||||
Reference in New Issue
Block a user