/// <summary> /// Generate a random token or verification code. /// </summary> /// <param name="length">The exact length of the token.</param> /// <returns>The radom token generated.</returns> protected string GenerateToken(int length = 30) { // Create a new token. Nequeo.Invention.TokenGenerator token = new Invention.TokenGenerator(); return(token.Random(length)); }
/// <summary> /// Genrate a new nonce. /// </summary> /// <param name="size">The size of the nonce.</param> /// <returns>The nonce data.</returns> public string GenerateNonce(int size = 30) { Nequeo.Invention.TokenGenerator token = new Invention.TokenGenerator(); return(token.Random(size)); }