pull down to refresh
You can fix your example by using salt || MD5(grade || salt || secret) as the code on the lockers.
salt || MD5(grade || salt || secret)
salt is just a random value which makes sure that every hash will be different.
salt
secret is a secret value which only teachers know. This prevents that students can just try every grade and compare hashes.
secret
With || I mean concatenation.
||
This may be too complicated for 8 graders now though.
You can fix your example by using
salt || MD5(grade || salt || secret)as the code on the lockers.saltis just a random value which makes sure that every hash will be different.secretis a secret value which only teachers know. This prevents that students can just try every grade and compare hashes.With
||I mean concatenation.This may be too complicated for 8 graders now though.