AuthenticationCode
public class AuthenticationCode : KeyMaterial
This class represents a message authentication code to verify the integrity of encrypted messages.
-
The size of the authentication code in bytes.
Declaration
Swift
public static let SizeInBytes: UInt32 -
Restore a authentication code from a byte array. Authentication codes are generated when encrypting a message. This initializer is for restoring an authentication code if it was persisted. The byte array is copied to a secure location and overwritten with zeroes to avoid the authentication code being compromised in memory. The authentication code itself is not a secret value, but access in other contexts is not necessary.
Declaration
Swift
public override init?(bytes: inout Bytes)Parameters
bytesThe message authentication code.
-
Compares two message authentication codes in constant time.
Declaration
Parameters
lhsA message authentication code.
rhsAnother message authentication code.
Return Value
trueif both message authentication codes are equal.
View on GitHub
AuthenticationCode Class Reference