HMAC and simple MAC
MAC (Message Authentication Code) is a code that verifies the authenticity of a message. It is correctly calculated only by a party who knows the private key. A naive method would be MAC = sha256(kalit + xabar) — but this is dangerous: due to the SHA-256 structure, an attacker can append an extension to the end of the message and generate a new valid MAC without knowing the key (length-extension attack).
That is why HMAC is used in practice. It mixes the key twice, in the inner and outer layers: HMAC(K, m) = H((K ^ opad) || H((K ^ ipad) || m)) — this completely prevents the length-extension attack.
Calculate the HMAC-SHA256 value for the given key and message:
kalit = CYBERSAMSU_HMAC_KALIT_2026
xabar = amount=100&to=alice¤cy=usd
Answer: the hex representation of the hash value (lowercase, no spaces).