Trims some fat from validateSignature() based on @RobertGonzalez PR #5