Hibernate: using HMAC to generate/check signature

This is an developing patch for genreate/check signature by HMAC