jsnode crypto createHmac & createHash

Etienne Cimon via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Nov 28 06:48:38 PST 2014


Keep an eye on this one: Botan in D, https://github.com/etcimon/botan

Should be finished in a couple weeks.

e.g. from the TLS module:

auto hmac = get_mac("HMAC(SHA-256)");
hmac.set_key(secret_key);
hmac.update_be(client_hello_bits.length);
hmac.update(client_hello_bits);
hmac.update_be(client_identity.length);
hmac.update(client_identity);
m_cookie = unlock(hmac.flush());


More information about the Digitalmars-d-learn mailing list