This check is repeated a few times in this file -- maybe move it into a utility function.

Also, what happens when the private key doesn't match?  Does the user have a way of knowing when a notification is unhandled because the keys didn't match?  Should there be a warning message, or some other sort of message returned to the client when things fail because of that?  (I'm probably showing my ignorance of SAMP here a little...)