Jump to content

[Suggestion] How to cache more than 1 code on lockable objects


Bjornadal

Recommended Posts

Hi.
 
Is it possible to make the client remember more than 1 code on lockable objects ?
Only reason i could come up with to why it is not allready pressent, is that you could make a script that cache all codes, making it so that you could open all doors.
 
Solution to this problem would be to make a random "salt" on each lock that only the server would know, and then hash the salt+combination.
So when you open a lock, the server will provide this hash back to the client and the client will cache this hash for as long as they are logged in or alive.
 
Im no expert in dayz programming, but basically something like this:
 
1. Lock is created with a hash=sha256("key commbination"+salt) and stored on the server with the lock ID and salt.
2. hash is sent to the client and stored there with the ID of the lock.
3. player tries to open the lock, hash is sent to the server with the lock ID.
4. server verifies the hash and opens the lock.
 
Could even make it so that the player cache for this data could not extend X ammount of hashes to prevent someone making rainbowtables and bruteforcing the locks.
 
-- Daniel
Link to comment
Share on other sites

I agree with this in principal, although it makes the use of combo locks obsolete in some way.

Why not just use keys...instead of using a combination. share the keys with friends, option to lock/unlock always available.

it goes back to the time old, why not have a key belt...or a set of keys...or the same key for multiple locks.

the possibilities are endless!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...