Example #1
0
        public override (string, double) Break(string cipher = null)
        {
            if (cipher == null)
            {
                cipher = this.Cipher;
            }
            else
            {
                this.Cipher = cipher;
            }

            IGA iga    = new IGA(this);
            var result = iga.Break(cipher);

            this.Plain = result.Item1;
            return(result);
        }
Example #2
0
 public Individual(string key, IGA iga)
 {
     this.key     = key;
     this.fitness = FrequencyAnalyst.Analyze(iga.Decode(key));
 }