How do Hotel Key Card systems work?
Every lock has a specific ID that can only be changed with special device that is connected to the lock directly. The cards are only programmed that way that there is a date until they are valid for being used as key, so if you steal a card and try to use it after the time of booking, the lock denies access even if the card has worked before simply because the date passed until it’s been declared as being valid. To make it difficult or nearly impossible to change the settings on the card (i.e. the date of validity or the ID of the lock(s) the card is valid for) at home using a regular card-reader/-writer the values are secured using cryptographic techniques like signatures and/or encryption. The single features are dependent on the system you buy and have influence on the price (of course). There are other systems where the locks really communicate with the server (allowing you to void a card that has been lost during the stay without the need of setting a new ID to the lock) but you d