Javascript two-way hash implementation with secret key.