1
0
mirror of https://github.com/XFox111/SimpleOTP.git synced 2026-04-23 08:08:40 +03:00

Created OTPConfiguration.GenerateConfiguration (markdown)

2021-05-31 19:00:56 +03:00
parent 50497d5211
commit ca8763c6e3
+27
@@ -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