okay. your post made me brainstorm, and i came up with the following ideas:
option a:
continue as i was, but modify the realsha1 function so if it encounters 00, it will return false.
then, in the original code, have the system do an if() check on the returned value. if false, disconnect.
on the clients side, check if the disconnect (via global variable) was caused by the disconnect button, or by other means, and if not by the button, automatically reconnect, generating a new source key, and hopefully not encountering the problem again.
obviously this requires me to get the function working, which i'm not too optimistic about.
option b:
find a service on the web that performs these calculations for me
option c:
steal option b. how? by taking the input from the client to my server, then running it against another server with websockets enabled, and since the results are the same no matter what server they're run on (except mine which is broke loel) i can just use the response from the alternate server to create /my/ response to my client.
option d:
make option b with php and run it on a free webhost.
obviously options b, c, and d are going to raise response time, but i'm looking for "it works" right about now, not "it works brilliantly!"
besides, once the intial connection is established, i can probably handle everything on my end.
additionally, unless i do option d, i might (or rather, kalphiter might) get complaints about too many requests to one guys server. although, websockets are designed for minimal requests, and beyond the initial request... hmm.
anyone have any input?