unify signature obtention for bin and sha1 messages