Contents

isValidAuthenticationCode(_:authenticating:using:)

Returns a Boolean value indicating whether the given message authentication code represented as contiguous bytes is valid for a block of data.

Declaration

static func isValidAuthenticationCode<C, D>(_ authenticationCode: C, authenticating authenticatedData: D, using key: SymmetricKey) -> Bool where C : ContiguousBytes, D : DataProtocol

Parameters

  • authenticationCode:

    The authentication code to compare.

  • authenticatedData:

    The block of data to compare.

  • key:

    The symmetric key for the authentication code.

Return Value

A Boolean value that’s true if the message authentication code is valid for the specified block of data.

See Also

Checking an authentication code