To provide a method of transmitting data capable of easily encoding a packet constituting a data and a bit row provided in bar code information of which relatively data length is fixed to be short, to ensure secrecy in talk and privacy, and also to cope with wireless data transmission of code diffusion system, in data communication over Internet or a mobile unit.
A code row LUT constituted by PN series including Barker series or the like produced by a plurality of limited length pseudo random numbers to be respectively provided with a flag in the code row is constructed, which is shared by transmitting and receiving sides. In the case of data transmission, the transmitting side selects the code row at each transmission time or at random, and the flag of the code row used in encoding a data is reported to the receiving side.