M
Michael Fairbank
Is there a simple way I can calculate a checksum on a java class?
I want some simple verification that my applet has not been modified before
it submits to the server. I know it's not going to be 100% secure but it's
better than nothing.
I was thinking of using ClassLoader.getSystemResouceAsStream, and then
writing my own checksum algorithm on that stream. Is there a simpler way to
do this?
Also, another problem I am going to have with that is that
getSystemResouceAsStream takes a string argument for the class name. This
is annoying because the obfuscator I run will change all the class names! It
would be better if I pass the object itself, e.g. call to a function as
calcChecksum(this).
I'm grateful for any suggestions.
Thanks in advance,
Mike
I want some simple verification that my applet has not been modified before
it submits to the server. I know it's not going to be 100% secure but it's
better than nothing.
I was thinking of using ClassLoader.getSystemResouceAsStream, and then
writing my own checksum algorithm on that stream. Is there a simpler way to
do this?
Also, another problem I am going to have with that is that
getSystemResouceAsStream takes a string argument for the class name. This
is annoying because the obfuscator I run will change all the class names! It
would be better if I pass the object itself, e.g. call to a function as
calcChecksum(this).
I'm grateful for any suggestions.
Thanks in advance,
Mike