You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* This class holds the context information required for encryption and decryption operations with
26
-
* AES (Advanced Encryption Standard). Both AES-ECB and AES-CBC modes are supported.
21
+
* This class holds the context information required for encryption and decryption operations with AES (Advanced Encryption Standard). Both AES-ECB and AES-CBC modes are supported.
27
22
*
28
23
* ```gdscript
29
24
* //gdscript
@@ -33,8 +28,7 @@ import kotlin.jvm.JvmOverloads
33
28
*
34
29
* func _ready():
35
30
* var key = "My secret key!!!" # Key must be either 16 or 32 bytes.
36
-
* var data = "My secret text!!" # Data size must be multiple of 16 bytes, apply padding if
37
-
* needed.
31
+
* var data = "My secret text!!" # Data size must be multiple of 16 bytes, apply padding if needed.
* Start the AES context in the given [mode]. A [key] of either 16 or 32 bytes must always be
110
-
* provided, while an [iv] (initialization vector) of exactly 16 bytes, is only needed when [mode] is
111
-
* either [MODE_CBC_ENCRYPT] or [MODE_CBC_DECRYPT].
102
+
* 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 [MODE_CBC_ENCRYPT] or [MODE_CBC_DECRYPT].
112
103
*/
113
104
@JvmOverloads
114
105
publicfinalfunstart(
@@ -122,8 +113,7 @@ public open class AESContext : RefCounted() {
122
113
}
123
114
124
115
/**
125
-
* Run the desired operation for this AES context. Will return a [PackedByteArray] containing the
126
-
* result of encrypting (or decrypting) the given [src]. See [start] for mode of operation.
116
+
* Run the desired operation for this AES context. Will return a [PackedByteArray] containing the result of encrypting (or decrypting) the given [src]. See [start] for mode of operation.
127
117
*
128
118
* **Note:** The size of [src] must be a multiple of 16. Apply some padding if needed.
129
119
*/
@@ -134,11 +124,9 @@ public open class AESContext : RefCounted() {
134
124
}
135
125
136
126
/**
137
-
* Get the current IV state for this context (IV gets updated when calling [update]). You normally
138
-
* don't need this function.
127
+
* Get the current IV state for this context (IV gets updated when calling [update]). You normally don't need this function.
139
128
*
140
-
* **Note:** This function only makes sense when the context is started with [MODE_CBC_ENCRYPT] or
141
-
* [MODE_CBC_DECRYPT].
129
+
* **Note:** This function only makes sense when the context is started with [MODE_CBC_ENCRYPT] or [MODE_CBC_DECRYPT].
142
130
*/
143
131
publicfinalfungetIvState(): PackedByteArray {
144
132
TransferContext.writeArguments()
@@ -149,7 +137,7 @@ public open class AESContext : RefCounted() {
149
137
/**
150
138
* Close this AES context so it can be started again. See [start].
0 commit comments