Add template methods for encryption operations