refs #4701: Prevent hash length extension attack.

http://blog.whitehatsec.com/hash-length-extension-attacks/