Utility to deal with Base32 encoding and decoding.
http://tools.ietf.org/html/rfc4648
예제 #1
0
 /// <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));
 }
예제 #2
0
 /// <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)));
 }