Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
533 changes: 378 additions & 155 deletions classes/class_@gdscript.rst

Large diffs are not rendered by default.

1,484 changes: 812 additions & 672 deletions classes/class_@globalscope.rst

Large diffs are not rendered by default.

468 changes: 318 additions & 150 deletions classes/class_aabb.rst

Large diffs are not rendered by default.

134 changes: 85 additions & 49 deletions classes/class_acceptdialog.rst

Large diffs are not rendered by default.

48 changes: 25 additions & 23 deletions classes/class_aescontext.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ This class holds the context information required for encryption and decryption
.. code-tab:: gdscript

extends Node

var aes = AESContext.new()

func _ready():
var key = "My secret key!!!" # Key must be either 16 or 32 bytes.
var data = "My secret text!!" # Data size must be multiple of 16 bytes, apply padding if needed.
Expand All @@ -43,7 +43,7 @@ This class holds the context information required for encryption and decryption
aes.finish()
# Check ECB
assert(decrypted == data.to_utf8_buffer())

var iv = "My secret iv!!!!" # IV must be of exactly 16 bytes.
# Encrypt CBC
aes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8_buffer(), iv.to_utf8_buffer())
Expand All @@ -60,11 +60,11 @@ This class holds the context information required for encryption and decryption

using Godot;
using System.Diagnostics;

public partial class MyNode : Node
{
private AesContext _aes = new AesContext();

public override void _Ready()
{
string key = "My secret key!!!"; // Key must be either 16 or 32 bytes.
Expand All @@ -79,7 +79,7 @@ This class holds the context information required for encryption and decryption
_aes.Finish();
// Check ECB
Debug.Assert(decrypted == data.ToUtf8Buffer());

string iv = "My secret iv!!!!"; // IV must be of exactly 16 bytes.
// Encrypt CBC
_aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer(), iv.ToUtf8Buffer());
Expand All @@ -104,15 +104,15 @@ Methods
.. table::
:widths: auto

+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`finish<class_AESContext_method_finish>` **(** **)** |
+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_iv_state<class_AESContext_method_get_iv_state>` **(** **)** |
+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`start<class_AESContext_method_start>` **(** :ref:`Mode<enum_AESContext_Mode>` mode, :ref:`PackedByteArray<class_PackedByteArray>` key, :ref:`PackedByteArray<class_PackedByteArray>` iv=PackedByteArray() **)** |
+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`update<class_AESContext_method_update>` **(** :ref:`PackedByteArray<class_PackedByteArray>` src **)** |
+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`finish<class_AESContext_method_finish>`\ (\ ) |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_iv_state<class_AESContext_method_get_iv_state>`\ (\ ) |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`start<class_AESContext_method_start>`\ (\ mode\: :ref:`Mode<enum_AESContext_Mode>`, key\: :ref:`PackedByteArray<class_PackedByteArray>`, iv\: :ref:`PackedByteArray<class_PackedByteArray>` = PackedByteArray()\ ) |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`update<class_AESContext_method_update>`\ (\ src\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

.. rst-class:: classref-section-separator

Expand All @@ -127,7 +127,7 @@ Enumerations

.. rst-class:: classref-enumeration

enum **Mode**:
enum **Mode**: :ref:`🔗<enum_AESContext_Mode>`

.. _class_AESContext_constant_MODE_ECB_ENCRYPT:

Expand Down Expand Up @@ -182,9 +182,9 @@ Method Descriptions

.. rst-class:: classref-method

void **finish** **(** **)**
|void| **finish**\ (\ ) :ref:`🔗<class_AESContext_method_finish>`

Close this AES context so it can be started again. See :ref:`start<class_AESContext_method_start>`.
Close this AES context so it can be started again. See :ref:`start()<class_AESContext_method_start>`.

.. rst-class:: classref-item-separator

Expand All @@ -194,9 +194,9 @@ Close this AES context so it can be started again. See :ref:`start<class_AESCont

.. rst-class:: classref-method

:ref:`PackedByteArray<class_PackedByteArray>` **get_iv_state** **(** **)**
:ref:`PackedByteArray<class_PackedByteArray>` **get_iv_state**\ (\ ) :ref:`🔗<class_AESContext_method_get_iv_state>`

Get the current IV state for this context (IV gets updated when calling :ref:`update<class_AESContext_method_update>`). You normally don't need this function.
Get the current IV state for this context (IV gets updated when calling :ref:`update()<class_AESContext_method_update>`). You normally don't need this function.

\ **Note:** This function only makes sense when the context is started with :ref:`MODE_CBC_ENCRYPT<class_AESContext_constant_MODE_CBC_ENCRYPT>` or :ref:`MODE_CBC_DECRYPT<class_AESContext_constant_MODE_CBC_DECRYPT>`.

Expand All @@ -208,7 +208,7 @@ Get the current IV state for this context (IV gets updated when calling :ref:`up

.. rst-class:: classref-method

:ref:`Error<enum_@GlobalScope_Error>` **start** **(** :ref:`Mode<enum_AESContext_Mode>` mode, :ref:`PackedByteArray<class_PackedByteArray>` key, :ref:`PackedByteArray<class_PackedByteArray>` iv=PackedByteArray() **)**
:ref:`Error<enum_@GlobalScope_Error>` **start**\ (\ mode\: :ref:`Mode<enum_AESContext_Mode>`, key\: :ref:`PackedByteArray<class_PackedByteArray>`, iv\: :ref:`PackedByteArray<class_PackedByteArray>` = PackedByteArray()\ ) :ref:`🔗<class_AESContext_method_start>`

Start the AES context in the given ``mode``. A ``key`` of either 16 or 32 bytes must always be provided, while an ``iv`` (initialization vector) of exactly 16 bytes, is only needed when ``mode`` is either :ref:`MODE_CBC_ENCRYPT<class_AESContext_constant_MODE_CBC_ENCRYPT>` or :ref:`MODE_CBC_DECRYPT<class_AESContext_constant_MODE_CBC_DECRYPT>`.

Expand All @@ -220,16 +220,18 @@ Start the AES context in the given ``mode``. A ``key`` of either 16 or 32 bytes

.. rst-class:: classref-method

:ref:`PackedByteArray<class_PackedByteArray>` **update** **(** :ref:`PackedByteArray<class_PackedByteArray>` src **)**
:ref:`PackedByteArray<class_PackedByteArray>` **update**\ (\ src\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_AESContext_method_update>`

Run the desired operation for this AES context. Will return a :ref:`PackedByteArray<class_PackedByteArray>` containing the result of encrypting (or decrypting) the given ``src``. See :ref:`start<class_AESContext_method_start>` for mode of operation.
Run the desired operation for this AES context. Will return a :ref:`PackedByteArray<class_PackedByteArray>` containing the result of encrypting (or decrypting) the given ``src``. See :ref:`start()<class_AESContext_method_start>` for mode of operation.

\ **Note:** The size of ``src`` must be a multiple of 16. Apply some padding if needed.

.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
.. |void| replace:: :abbr:`void (No return value.)`
Loading