Exemplo n.º 1
0
        public void TestReverseCardLoopSize()
        {
            var lockSystem = new LockSystem {
                CardPublicKey = 5764801
            };
            var loopSize = lockSystem.ReverseCardLoopSize();

            Assert.AreEqual(loopSize, 8);
        }
Exemplo n.º 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);
        }