Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次の方法で HMAC_SHA1 ハッシュを作成する必要があります。
auth_reponse = HMAC_SHA1(key=session_id, data=decypted_challenge)
M2Crypto でこれを行うにはどうすればよいですか?
試す:
from M2Crypto.EVP import HMAC import base64 hmac = HMAC(session_id,'sha1') hmac.update(decypted_challenge) auth_response = base64.encodestring(hmac.digest()) #Base64 format
また:
auth_response = hmac.digest() #Binary format
よろしく!