From 91afcf2a0f0e881849e8c586a3795131de125ec2 Mon Sep 17 00:00:00 2001 From: Eugene Fox Date: Mon, 31 May 2021 17:16:18 +0300 Subject: [PATCH] Created SecretGenerator.GenerateSecret (markdown) --- SecretGenerator.GenerateSecret.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 SecretGenerator.GenerateSecret.md diff --git a/SecretGenerator.GenerateSecret.md b/SecretGenerator.GenerateSecret.md new file mode 100644 index 0000000..201e5a2 --- /dev/null +++ b/SecretGenerator.GenerateSecret.md @@ -0,0 +1,22 @@ +Namespace: `SimpleOTP.Helpers` + +Assembly: `SimpleOTP.dll` + +Generate OTP secret key. +```csharp +public static string GenerateSecret(int length = 160); +``` +### Parameters +`length` `Int32` + +Length of the key in bits + +It should belong to [128-160] bit span + +Default is: 160 bits. + +### Returns +Base32 encoded alphanumeric string with length form 16 to 20 characters. + +### Remarks +CURRENTLY THIS GENERATOR WORKS CORRECTLY ONLY WITH 160-BIT LENGTHS. Set `length` at your own risk. \ No newline at end of file