/// <summary> /// Creates a client who will use the default interface. It will default to the left shift cypher. /// </summary> /// <returns>The client object.</returns> public override AbsClientEndpt CreateClient() { System.Console.WriteLine("\t\t\tASTPFactory.CreateClient: Creating a client with default options."); ASTPClient client = new ASTPClient { Cypher = left.Clone() }; return(client); }
/// <summary> /// Creates a client using the specified type variation. /// </summary> /// <param name="type">Specifies the encryption algorithm, either right or left. It is case insensitive.</param> /// <returns>The client object.</returns> public override AbsClientEndpt CreateClient(string type) { System.Console.WriteLine("\t\t\tASTPFactory.CreateClient: Creating a client with " + type + " option."); ASTPClient client = new ASTPClient(); //find the right encryption algorithm if (type.ToLower().CompareTo("right") == 0) { client.Cypher = right.Clone(); } else { client.Cypher = left.Clone(); //as above it defaults to left shift } //all built, return it return(client); }