/// <summary> /// Generate a TOTP using provided binary data. /// </summary> /// <param name="key">Key in String Format.</param> /// <returns>Time-based One Time Password encoded byte array.</returns> public string Generate(string key) { byte[] bkey = Base32.Decode(key.Trim()); return(this.GenerateByByte(bkey)); }
/// <summary> /// Generate a TOTP using provided binary data. /// </summary> /// <param name="key">Key in String Format.</param> /// <returns>Time-based One Time Password encoded byte array.</returns> public string Generate(string key) { return(this.GenerateByByte(Base32.Decode(key))); }