Drug safety has always been valued by consumers, and pharmaceutical packaging itself to has the anti-counterfeiting function is vital. As a high-volume two-dimensional code, Quick Response (QR) codes are widely used in mobile Internet. The anti-counterfeiting method of pharmaceutical packaging based on the encrypted QR code is proposed. First, the QR code is used to store the drug information as the information carrier; Then, it is encrypted as a security carrier; Finally, the authentication of the anti-counterfeit carrier on the server can have the anti-counterfeiting effect. Compared with traditional pharmaceutical packaging anti-counterfeiting method, this proposed method has lower cost and better interaction.