Otp

static class · namespace z3n7.Tools · source Tools/Otp.cs

public static class Otp

One-time codes.

Methods

FirstMail

public static string FirstMail(IZennoPosterProjectModel project, string email)

source

Code from the latest FirstMail message sent to email (see z3n7.FirstMail.GetOTP).

Parameter Description
email Original recipient the message was sent to.

Offline

public static string Offline(string keyString, int waitIfTimeLess = 5)

source

Computes the current TOTP code from a Base32 secret. When the code expires within waitIfTimeLess seconds, waits for the next one.

Parameter Description
keyString Base32 secret.
waitIfTimeLess Seconds of validity below which the next code is awaited.

Returns: The code. Throws for an empty secret.