AESContext
Provides access to AES encryption/decryption of raw data.
AESContext.swift:12class AESContext
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.
Superclasses
class RefCounted
Base class for reference-counted objects.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Types
Type members
Instance members
func finish(
) Close this AES context so it can be started again. See
start(mode:key:iv:)
.func getIvState(
) -> PackedByteArray Get the current IV state for this context (IV gets updated when calling
update(src:)
). You normally don’t need this function.func start(mode: AESContext.Mode, key: PackedByteArray, iv: PackedByteArray
) -> GodotError Start the AES context in the given
mode
. Akey
of either 16 or 32 bytes must always be provided, while aniv
(initialization vector) of exactly 16 bytes, is only needed whenmode
is either .cbcEncrypt or .cbcDecrypt.func update(src: PackedByteArray
) -> PackedByteArray Run the desired operation for this AES context. Will return a
PackedByteArray
containing the result of encrypting (or decrypting) the givensrc
. Seestart(mode:key:iv:)
for mode of operation.