ã¡ããã¨HMAC-SHA256ã使ã£ãç°¡åãªãä»äºããã£ãã®ã§ãPythonã§ããã£ã¦ã¿ãã HMACã£ã¦ãªããããªãã¤ã¨ããæ¹ã¯RFC2104ã¸ã©ããã¼ã Pythonã«ã¯æåããHMACåãæ±ããããã«ãªã£ã¦ããã®ã§ã©ã¯ãã³ã§ããã import hmac import hashlib secretkey = 'ç§å¯éµ' message = 'ã¡ãã»ã¼ã¸æ¤è¨¼ããããªã«ãã®ã' signature = hmac.new(secretkey, message, hashlib.sha256).hexdigest() hmac.new()ã®ç¬¬ä¸å¼æ°ãããã·ã¥é¢æ°ãªã®ã§ãMD5ã«ããããªãhashlib.md5ã¨ãæå®ããã°ããã 詳ããã¨ããã¯ãPythonã©ã¤ãã©ãªãªãã¡ã¬ã³ã¹ã®hmacã®é ãèªãã§ãã
{{#tags}}- {{label}}
{{/tags}}