I am developing a game in cocos2d-x 2.2.3 and I want to protect my resources from being extracted. Is there any way I can do this?
I don't know much about encryption.
There's honestly not a lot you can do here in terms of absolute protection.
No matter how strong a vault you lock your resources inside, ultimately your game needs to know the code to open that vault so that it can use/display/play the resources in-game.
That means anyone who has a copy of your game also has a copy of the code or procedure to read those protected assets. A dedicated adversary will always be able to extract the resources given these tools.
All you can really do technologically is make it incrementally harder to do so, to the point where most people won't care enough to put in that time.
But that's time you're sinking into complex features that don't make your game play any better, fighting against a potential adversary you can never fully defeat anyway. I wouldn't recommend it as a valuable use of your time.
So rather than solving the issue with technology, you may want to consider a legal protection instead. Creative works like game assets (illustrations, music, 3D sculptures....) are automatically protected by copyright in many jurisdictions. If someone is using or distributing your resources in a way that you have not authorized, you'd have grounds for a legal case against them.
It's not practical to try to stop every homebrew tinkerer this way, but if someone is systematically trying to redistribute/resell your assets or use them in their own competing game, this gives you some recourse that they can't as easily hack their way around.