init(authenticating:key:)

Computes a hash-based message authentication code (HMAC) for the given message using the given key.

MessageAuthenticationHash.swift:40
init(authenticating message: some Sequence<UInt8>, key: some Collection<UInt8>)

This initializer computes an instance of MessageAuthenticationKey and uses it to generate an instance of Self. If you are reusing the same key multiple times, it is more efficient to compute the message authentication key externally and call its MessageAuthenticationKey.authenticate(_:) method instead.