Here’s how to figure out the hashes of method names used by JBoss’ RMI invoker from the shell. The first two numbers in the method signature form the length of the string. Maybe there’s a better way to do the backrefs in sed, but you do need to swap them around.
$ echo $[`printf " 00 31ping(Ljava/lang/String;)V" | sha1sum | sed -e "s/(..)(..)(..)(..)(..)(..)(..)(..).*/0x87654321/g"`]
Don’t ask me why I figured that out.