Tidied up crypto_stream