Improved security of OptInHandler.

Replaced MD5 hashing with HMAC crypto.