Clean up PublishToWebonary settings

* Clean up some code and confusion
* Add some tests for the encryption and decryption methods

Change-Id: Ifcde5a36d160eb11e53de0525abb081dc32a39fa