NO, barcode, qrcode or similar technologies are good for tracking but not for protection.
Barcode and qrcode are digital to physical technologies. This means that knowing the content of the code, even if it is encrypted, one can easily use a barcode generator to create a code that is always meant to match. Also a replicated barcode cannot be identified or separated from the duplicate.
Barcode and qrcode was originally invented for tracking purpose. All SKU codes are barcode as it poses no challenge in being duplicated. Using a technology beyond the purpose of its creation can lead to unknown results, the reason all barcode/qrcode based solutions are duplicated immediately.