Recently, somebody ask me about assets encrypt/decrypt questions. so I share a batch encrypt tool and EncryptManager source code which is used in game runtime to decrypt assets at here.
Then you can use command line to encrypt your assets x-studio365 -c -enc -cfg=D:\encrypt-cfg.xml -i=D:\OriginalRes1 -o=D:\EncryptedRes1
other flags: -j2: Enable 2 threads for encrypt assets -ft=*.png;*.csb: Specific encrypt file types -dc=.ttf;.mp3;.ogg: Specific directly copy file types
pitfall:
(1) The ivec and key are generated by the tool randomly, and will store to encrypt-cfg.xml
(2) If the encrypt-cfg.xml is already exist, the tool will read options from it, but will be overwrite by command line arguments, if you want new random key/ivec and use the exist encrypt-cfg.xml, you can delete the elements ivec and key from the it.