PeerCastStation.Core.AuthenticationKey.Generate C# (CSharp) Method

Generate() public static method

public static Generate ( ) : AuthenticationKey
return AuthenticationKey
    public static AuthenticationKey Generate()
    {
      return new AuthenticationKey(
        new String(Enumerable.Range(0, 16).Select(i => KeyCharTable[random.Next(KeyCharTable.Length)]).ToArray()),
        new String(Enumerable.Range(0, 16).Select(i => KeyCharTable[random.Next(KeyCharTable.Length)]).ToArray())
      );
    }
  }

Usage Example

Example #1
0
 public void ResetAuthenticationKey()
 {
     this.AuthenticationKey = AuthenticationKey.Generate();
 }