QUOTE(Squeller @ May 9 2005, 11:46 AM)
Of course. But I wouldn't see the need of using a cryptograhically strong hash function like sha<n> or md5 or whatever. Just to prevent manual foobar2000.conf editing???
This is quite restricting for us right now, but look at the developers side. If you try to load a config file, you have to be sure that you want to use correct values from that file. Of course, your own plugin wrote correct values, i.e. only numbers in integer fields. But, if someone changes the config file
outside foobar, he can write any value there, and this value could coast the whole loading process.
So, there are basically 2 solutions: one is to check each and every loaded value if it!s the correct type, in the correct range, whatever. The other is some function to check if the config file has been tampered with, and if yes, use the default values. So, if there are, say, 100 settings (which is quite possible with foobar), in the first case you'd need at the very least 100 checks, maybe even plugin devs should write some for themselves, and in the second case, only one check. This "only one" check can be CPU intensive, but it's easier to check if it works correctly, and less prone to developer typos.
I hope what I said above is clear and valid at the same time