def hmac_sha256(k, m):
 key = OpenSSL.malloc(k, len(k))
 d = OpenSSL.malloc(m, len(m))
 md = OpenSSL.malloc(0, 32)
 i = OpenSSL.pointer(OpenSSL.c_int(0))
 OpenSSL.HMAC(OpenSSL.EVP_sha256(), key, len(k), d, len(m), md, i)
 return md.raw

def hmac_sha256 ( k , m ) : key = OpenSSL . malloc ( k , len ( k ) ) d = OpenSSL . malloc ( m , len ( m ) ) md = OpenSSL . malloc ( 0 , 32 ) i = OpenSSL . pointer ( OpenSSL . c_int ( 0 ) ) OpenSSL . HMAC ( OpenSSL . EVP_sha256 ( ) , key , len ( k ) , d , len ( m ) , md , i ) return md . raw
compute the key and the message with hmac sha5256 .