练习:计算 HMAC
Last updated
Last updated
Write a program to calculate HMAC-SHA-384 of given text message by given key. Write your code in programming language of choice.
编写程序,根据给定的密钥计算给定文本消息的 HMAC-SHA-384。自行选择编程语言来编写代码。
Hints: follow the Python examples, given earlier in this section or search in Internet.
提示:参考本节之前给出的 Python 示例,或在 Internet 上搜索。
Input
Output
Message: hello Key: cryptography
83d1c3d3774d8a32b8ea0460330c16d1b2e3e5c0ea86ccc2d70e603aa8c8151d675dfe339d83f3f495fab226795789d4
Message: hello Key: again
4c549a549aa037e0fb651569bf271faa23cfa20e8a9d21438a6ff5bf6be916bebdbaa48001e0cd6941ec74cd02be70e5