AES cipher: make padding optional

Fixes #5152
Merge pull request #5154 from Rob--W/aes-padding-5152

AES cipher: make padding optional