MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / hmac_sha512

Function hmac_sha512

src/pyelliptic/hash.py:48–57  ·  view source on GitHub ↗

Compute the key and the message with HMAC SHA512

(k, m)

Source from the content-addressed store, hash-verified

46
47
48def hmac_sha512(k, m):
49 """
50 Compute the key and the message with HMAC SHA512
51 """
52 key = OpenSSL.malloc(k, len(k))
53 d = OpenSSL.malloc(m, len(m))
54 md = OpenSSL.malloc(0, 64)
55 i = OpenSSL.pointer(OpenSSL.c_int(0))
56 OpenSSL.HMAC(OpenSSL.EVP_sha512(), key, len(k), d, len(m), md, i)
57 return md.raw
58
59
60def pbkdf2(password, salt=None, i=10000, keylen=64):

Callers

nothing calls this directly

Calls 1

mallocMethod · 0.80

Tested by

no test coverage detected