HMACContext
Used to create an HMAC for a message using a key.
HMACContext.swift:12class HMACContext
The HMACContext class is useful for advanced HMAC use cases, such as streaming the message as it supports creating the message over time rather than providing it all at once.
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.
Type members
Instance members
func finish(
) -> PackedByteArray Returns the resulting HMAC. If the HMAC failed, an empty
PackedByteArray
is returned.func start(hashType: HashingContext.HashType, key: PackedByteArray
) -> GodotError Initializes the HMACContext. This method cannot be called again on the same HMACContext until
finish
has been called.func update(data: PackedByteArray
) -> GodotError Updates the message to be HMACed. This can be called multiple times before
finish
is called to appenddata
to the message, but cannot be called untilstart(hashType:key:)
has been called.