Contents

authenticationCode(for:using:)

Computes a message authentication code for the given data.

Declaration

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

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.