Contents

isValidAuthenticationCode(_:authenticating:using:)

Returns a Boolean value indicating whether the given message authentication code is valid for a block of data stored in a buffer.

Declaration

static func isValidAuthenticationCode(_ mac: HMAC<H>.MAC, authenticating bufferPointer: UnsafeRawBufferPointer, using key: SymmetricKey) -> Bool

Parameters

  • mac:

    The authentication code to compare.

  • bufferPointer:

    A pointer to 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 data within the specified buffer.

See Also

Checking an authentication code