Merge pull request #1321 from alex/check-padding

Verify that padding is an instance of AsymmetircPadding before trying to use it; fixes #1318