added seperate encrypt and decrypt object for encoding. Also fixed mix up between decode input encoding and output encoding.
fixed opts object parsing inside of encodedecode.js and updated all tests to conform to this change.