You could certainly do this with streams, but you would use an external encryption mechanism. Basically, encrypt the data using the key in your application (perhaps using openssl) then publish the encrypted binary blob to the stream. On the other end, your application could decrypt using the same key that it obtained via mail or whatever.