Contents

authenticationCode(for:using:)

Computes a message authentication code for the given data.

Declaration

static func authenticationCode<D>(for data: D, using key: SymmetricKey) -> HMAC<H>.MAC where D : DataProtocol

Parameters

  • data:

    The data for which to compute the authentication code.

  • key:

    The symmetric key used to secure the computation.

Return Value

The message authentication code.