mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
Improve the Compiling with script encryption key page
This commit is contained in:
@@ -5,22 +5,30 @@ Compiling with script 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
|
||||
The export dialog gives you the option to encrypt your scripts with a 256-bit
|
||||
AES key when releasing your project. This will make sure your scripts 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,
|
||||
|
||||
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.
|
||||
|
||||
For this to work, you need to build the export templates from source,
|
||||
with that same key.
|
||||
|
||||
.. warning::
|
||||
|
||||
This will **not** work if you use official, precompiled export templates.
|
||||
It is absolutely **required** to compile your own export templates to use
|
||||
PCK encryption.
|
||||
|
||||
Step by step
|
||||
------------
|
||||
|
||||
1. Generate a 256bit AES key in HEX. You can use the aes-256-cbc variant from
|
||||
1. Generate a 256-bit AES key in hexadecimal format. You can use the aes-256-cbc variant from
|
||||
`this service <https://asecuritysite.com/encryption/keygen>`_.
|
||||
|
||||
Alternatively, you can generate it yourself by using OpenSSL:
|
||||
Alternatively, you can generate it yourself using
|
||||
`OpenSSL <https://www.openssl.org/>`__ command-line tools:
|
||||
|
||||
::
|
||||
|
||||
@@ -30,6 +38,7 @@ Step by step
|
||||
|
||||
::
|
||||
|
||||
# NOTE: Do not use the key below! Generate your own key instead.
|
||||
aeb1bc56aaf580cc31784e9c41551e9ed976ecba10d315db591e749f3f64890f
|
||||
|
||||
You can generate the key without redirecting the output to a file, but
|
||||
@@ -54,13 +63,13 @@ 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 **Script** tab of the export preset:
|
||||
|
||||
.. image:: img/script_encryption_key.png
|
||||
|
||||
5. Export the project. The game should run with encrypted scripts now.
|
||||
|
||||
Possible Errors
|
||||
Troubleshooting
|
||||
---------------
|
||||
|
||||
If you get an error like below, it means the key wasn't properly included in
|
||||
|
||||
Reference in New Issue
Block a user