Use a more efficient means of detecting incorrect padding