Unity assets encryption tools

 

Package 'Assets Encryption Tools' is designed to encrypt the resources of the game
Package includes
- Example of embedding the mechanism of encryption of resources
- Visual interface for the operation of resource encryption

Supported:
- Encryption of text resources (TextAsset)
- Encryption of texture asses (Texure2D)
- Encryption of bundles (AssetBundle)
- Encryption of binary data

 

 

 


=============================================================
- Example of embedding the mechanism of encryption of resources


\Assets\DevXUnity\AssetEncryption\DecryptTools.cs
Class DecryptTools is an auxiliary class for data encryption

Basic methods
 static string _DefaultEncryptPassword - Stores the default password
        internal static bool IsEncrypted(string value) - Check if the file is encrypted
        internal static byte[] DecryptBytes(string value, string password) - Decrypts binary data
        internal static string DecryptString(string value, string password) - Decrypts string data

 

\Assets\DevXUnity\AssetEncryption\ResourcesDecrypt.cs

Class ResourcesDecrypt implement methods for obtaining encrypted resources

Basic methods
        internal static string LoadEncryptedResourceText(string resource_name, string key) - Load encrypted resource text asset
        internal static byte[] LoadEncryptedResourceBinary(string resource_name, string key) - Load encrypted resource binary data
        internal static Texture2D LoadEncryptedResourceTexture(string resource_name, string key) - Load encrypted texure
        internal static Texture2D LoadEncryptedResourceTextureEx(string resource_name, string key, int width, int height, TextureFormat format, bool mipmap, bool linear) - Load encrypted texure (for raw image)
        internal static AssetBundle LoadEncryptedResourceAssetBundle(string resource_name, string key) -  Load encrypted bundles (AssetBundle)
        internal static UnityEngine.Object LoadEncryptedResourceAssetObject(string resource_name, string key) -  Load asset from encrypted bundles (AssetBundle)

=============================================================

 

=============================================================
- Visual interface for the operation of resource encryption

\Assets\DevXUnity\AssetEncryption\Editor\CryptoTools.cs
Class CryptoTools is an auxiliary class implementing the encryption mechanisms

Basic methods
        internal static bool IsFileEncrypted(string file_name) - Verify: is file encrypted
        internal static string EncryptBytes(byte[] value, string password, string meta_data = null) - Encrypt bytes buffer with password
        internal static string EncryptString(string value, string password, string meta_data = null) -  Encrypt string with password
        internal static byte[] DecryptBytes(string value, string password) - Decrypt bytes
        internal static string DecryptString(string value, string password) - Decrypt string


\Assets\DevXUnity\AssetEncryption\Editor\ResourcesEncrypt.cs

Basic methods
        internal static void Encrypt(string asset_name, string password, bool image_as_source_file=false) - Encrypt asset resource
        internal static void Decrypt(string encrypted_asset_name, string asset_name, string password) - Decrypt asset
        internal static List<AssetEncrypt> GetAllAssets() - Get all resources assets


\Assets\DevXUnity\AssetEncryption\Editor\ResourcesEncryptUI.cs
The ResourcesEncryptUI class implements a visual interface for encrypting resources

Basic methods
        internal static void AssetEncryptionShow() - Show Encryption manager Tab page
        void OnGUI() - Main GUI

=============================================================
       


 


 

 

 
05.07.2017