What is HMAC SHA384?
HMAC (Hash Message Authentication Code) is a type of message authentication involving two pieces, a cryptographic hash function and a secret shared between two parties.
The cryptographic quality of the method will depend upon the cryptographic hash function chosen and the quality of the shared secret.
HMAC SHA384 uses two passes of hash computations. First of all the shared key is used to derive two keys(inner and outer). On the first round, HMAC-SHA384 hash generates a hash based on the key and the message. On the second pass, we produce the final HMAC based on the previous hash found and the second derived key.
HMAC guarantees data integrity and authenticity. Since both parties have shared a private key, when one party receives the message(with the hash from the other party), it will recompute the hash and verify it matches the hash the other party have sent. That means, it is indeed the other party the one sending the message since nobody else have access to the private key.