public void TestReverseDoorLoopSize()
        {
            var lockSystem = new LockSystem {
                DoorPublicKey = 17807724
            };
            var loopSize = lockSystem.ReverseDoorLoopSize();

            Assert.AreEqual(loopSize, 11);
        }
Exemple #2
0
        static long First(long cardPublicKey, long doorPublicKey)
        {
            var lockSystem = new LockSystem()
            {
                CardPublicKey = cardPublicKey, DoorPublicKey = doorPublicKey
            };

            lockSystem.ReverseCardLoopSize();
            lockSystem.ReverseDoorLoopSize();
            lockSystem.ReverseEncryptionKey();
            return(lockSystem.EncryptionKey);
        }