Load encrypted image

hello,



I need to encrypt the images of my game, and when I decrypt, is returned an object of type Bin … How do I transform this Bin object in Texture?



is there another way to protect my pictures?



in fact, what I want is that the program only loads the images I allow … Otherwise, someone can delete a picture and exchange it for another image of the same name … and that I do not want that to happen!



anyone have any ideas for help-me ?

Just write "its not allowed to change the contents of the game". Then everybody who does is breaking the law. If somebody really wants to change the pictures, some encrypting will not stop them.

Even if you encrypt the images, your game still has to decrypt them to show them. When that happens, the guy playing the game can steal your picture. He can replace textures as well, by removing your security mechanism from the game.

then there is no safe way to protect my pictures?  :expressionless:



and if I put them in a database format bin? Is there any way of turning type Bin in type Texture?

If all you care about is hampering, a simple MD5 or SHA may be all that you need. Java is a pretty easy language to decompile (just google 'java decompiler'), so any intricate system you may create to protect your images will be pretty easy to edit out, or at least uncover.