The security of optical code division multi-access (OCDMA) system was analyzed, and the results indicate the hidden trouble of security. A scheme of multi-codes to be transmitted single-user information has been proposed, and single-user eavesdropping model has been simulated. The soft platform of system simulation was built by optisystem and MATLAB. The simulation analysis of the system has been accomplished on the soft platform. The brute-force searching and a code interception have been studied. The simulation results have shown that this system has better security.