Changed hmac and signatures calculation. Now they are calculated from hash, not from message