Beispiel #1
0
 public string Encode(ResponseModel model)
 {
     var array = _algorithms.SortArray(model.Words, false);
     array = _algorithms.ScrambleArrayText(array);
     var plaintext = _algorithms.ConcatenateArrayText(array, ConcatenationType.ASCII);
     return _algorithms.Base64Encode(plaintext);
 }
Beispiel #2
0
 public string Encode(ResponseModel model)
 {
     var array = _algorithms.ScrambleArrayText(model.Words);
     array = _algorithms.SortArray(array, true);
     array = _algorithms.FibonacciMagic(array, model.StartingFibonacciNumber);
     var plaintext = _algorithms.ConcatenateArrayText(array, ConcatenationType.ASCII);
     return _algorithms.Base64Encode(plaintext);
 }
Beispiel #3
0
 public string Encode(ResponseModel model)
 {
     var array = _algorithms.SplitWords(model.Words);
     array = _algorithms.SortArray(array, false);
     array = _algorithms.AlternateConsonants(array);
     array = _algorithms.FibonacciMagic(array, model.StartingFibonacciNumber);
     var plaintext = _algorithms.ConcatenateArrayText(array, ConcatenationType.Asterisks);
     return _algorithms.Base64Encode(plaintext);
 }
 public string Encode(ResponseModel model)
 {
     var encoder = EncodersDictionary[model.Algorithm];
     return encoder.Encode(model);
 }