2013-05-20から1日間の記事一覧

pythonとrubyでHMAC-SHA256

import hmac import hashlib secret_key = "secret_key" message = 'message' print hmac.new(secret_key, message, hashlib.sha256).hexdigest() # => ebb8d2ee5dcad6e9d6fc0b606811f9f03036bdd419a364d1a1ce1afa1bea61fd require 'openssl' secret_key = '…