Beispiel #1
0
 public bool Verify(PuzzleSolution solution)
 {
     if (solution == null)
     {
         throw new ArgumentNullException(nameof(solution));
     }
     return(this._RsaPubKey.Encrypt(solution._Value).Equals(this.PuzzleValue._Value));
 }
Beispiel #2
0
        public override bool Equals(object obj)
        {
            PuzzleSolution item = obj as PuzzleSolution;

            if (item == null)
            {
                return(false);
            }
            return(this._Value.Equals(item._Value));
        }
Beispiel #3
0
 public Puzzle GeneratePuzzle(ref PuzzleSolution solution)
 {
     solution = solution ?? new PuzzleSolution(Utils.GenerateEncryptableInteger(this._Key));
     return(new Puzzle(this, new PuzzleValue(Encrypt(solution._Value))));
 }