This example demonstrates how to encrypt/decrypt sensitive information for use in Splunk modular inputs using the storage/passwords endpoint without a separate setup.xml process.
Copy the TA_modinput_cred-example folder to $SPLUNK_HOME/etc/apps and restart Splunk
More information can be found here -> http://blogs.splunk.com/2016/10/08/encrypt-a-modula…-using-setup-xml/