In order to shorten the time required for encryption and decryption of communication
data, the contents of input data are analyzed by a discrimination method such as
pattern matching, and in accordance with this analysis result, it is checked whether
the received data is particular data. A portion of data judged as the particular
data is encrypted and sent to an output buffer, whereas a portion other than the
particular portion is not encrypted but is directly sent to the output buffer.
Thereafter, the contents in the output buffer are transmitted. The particular data
includes a control code of print data, upper bits of image data, predetermined
discrete bits of voice data, a conversion tale for compression data, and the like.