How does a stream cipher work?