Update encryption key page according to the new PCK encryption feature.

This commit is contained in:
bruvzg
2020-09-17 16:53:11 +03:00
parent 8a503eb9ed
commit 3a8d5bc8b4
3 changed files with 14 additions and 28 deletions

View File

@@ -1,13 +1,14 @@
.. _doc_compiling_with_script_encryption_key:
Compiling with script encryption key
====================================
Compiling with PCK encryption key
=================================
.. highlight:: shell
The export dialog gives you the option to encrypt your scripts with an 256bit
AES key, when releasing your game. This will make sure your scripts are not
stored in plain text and can not easily be ripped by some script kiddie.
The export dialog gives you the option to encrypt your PCK file with an 256bit
AES key, when releasing your game. This will make sure your scenes, scripts
and other resources are not stored in plain text and can not easily be ripped
by some script kiddie.
Of course the key needs to be stored in the binary, but if it's compiled,
optimized and without symbols, it would take some effort to find it.
@@ -52,38 +53,23 @@ Step by step
3. Compile Godot export templates and set them as custom export templates
in the export preset options.
4. Set the encryption key in the ``Script`` tab of the export preset:
4. Set the encryption key in the ``Encryption`` tab of the export preset:
.. image:: img/script_encryption_key.png
.. image:: img/encryption_key.png
5. Export the project. The game should run with encrypted scripts now.
5. Add filters for the files/folders to encrypt. By default, include filters
are empty and nothing will be encrypted.
6. Export the project. The game should run with the files encrypted now.
Possible Errors
---------------
If you get an error like below, it means the key wasn't properly included in
your Godot build. Godot is encrypting the scripts during export, but can't read
them at runtime.
your Godot build. Godot is encrypting PCK file during export, but can't read
it at runtime.
::
ERROR: open_and_parse: Condition ' String::md5(md5.digest) != String::md5(md5d) ' is true. returned: ERR_FILE_CORRUPT
At: core/io/file_access_encrypted.cpp:103
ERROR: load_byte_code: Condition ' err ' is true. returned: err
At: modules/gdscript/gdscript.cpp:755
ERROR: load: Condition ' err != OK ' is true. returned: RES()
At: modules/gdscript/gdscript.cpp:2135
ERROR: Failed loading resource: res://Node2D.gde
At: core/io/resource_loader.cpp:279
ERROR: poll: res://Node2D.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://Node2D.gd
At: scene/resources/scene_format_text.cpp:439
ERROR: load: Condition ' err != OK ' is true. returned: RES()
At: core/io/resource_loader.cpp:202
ERROR: Failed loading resource: res://Node2D.tscn
At: core/io/resource_loader.cpp:279
ERROR: Failed loading scene: res://Node2D.tscn
At: main/main.cpp:1727
WARNING: cleanup: ObjectDB Instances still exist!
At: core/object.cpp:2081
ERROR: clear: Resources Still in use at Exit!
At: core/resource.cpp:425

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB