Synchronization of chaotic injected-laser systems and its application to optical cryptography