Cookie::set prepends string to value

Hello there,

I noticed that when using Cookie::set, a string is prepended to the value I want it to have. So e.g. the code Cookie::set('language', 'de'); gives the cookie the value 376be9118b444110629df2fcd85fb60ef65b5679%2Bde.

Is this expected behaviour and if yes, how do I check the value of the Cookie the best way?

Thank you for any answer!

Ah, so after checking the underlaying functions, it seems that Cookie::set adds a hash value to the value given and Cookie::get removes that hash value again. Is that right?

Yes, exactly. I should add that the hashed value is not only removed, but the value and the hashed value compared to make sure that the data hasn’t been tampered with.