Encryption method patch

This patch allows for different padding schemes to be used.