convert to bytes for hmac