Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. CONot entirely true `:)`. For example, a menu of primary keys (1-10) could be hashed on the server side, and supplied to the client as a list to authenticate their usage. The user wishing to inject a non-permitted value 11 could not do so, since the server has not supplied a hash for it, and the private hashing salt is not visible on the client. I agree however that such an approach is more complicated than just validating server-side - and that one should validate server-side anyway!
      singulars
    2. CO@halfer Not entirely true? The example you give is still *completely* server-side security, not client-side in the least. In your example, you could *drop the hashing entirely*, and just send the client the list of 10 numbers. On submission, you're still going to check that the submitted number is in your server-side list of 10 values, whether those values are hashed or not. All you've done is injected a completely meaningless, 100% redundant hashing step. Literally all the security in your scenario still exists server-side.
      singulars
    3. COWell, re-reading the question, it doesn't specifically mention that the check should be done client side. I think the thrust of the question (which admittedly could be clearer) was: can hashing be used to check that data submitted is within the range of values that was supplied in the original form, without validating each one? My answer was yes, since that's a direct answer to the question, though in general doing ordinary validation is probably easier.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload