We propose a new optical stream cipher for security applications. The stream cipher's security is enhanced using hybrid cellular automata to replace uniform cellular automata as the keystream generators. The encoded ciphertext is obtained by randomly encoding both the initial states of cellular automata and their evolution rules. This results in an increase in complexity to crack the keystream generator and, thus, enhances the security of stream ciphers. The hardware implementation can be also correspondingly reduced. An optical solid-integrated scheme is suggested to implement the proposed stream cipher for high-speed encryption and decryption.