update iwp

pull/1/head
Jeff Becker 6 years ago
parent d6b5fc5224
commit 3f675f0290
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -65,6 +65,11 @@ static bool hash(llarp_hash_t *result, llarp_buffer_t buff) {
const uint8_t *base = (const uint8_t *)buff.base;
return crypto_generichash(*result, HASHSIZE, base, buff.sz, nullptr, 0) != -1;
}
static bool shorthash(llarp_shorthash_t *result, llarp_buffer_t buff) {
const uint8_t *base = (const uint8_t *)buff.base;
return crypto_generichash(*result, SHORTHASHSIZE, base, buff.sz, nullptr, 0) != -1;
}
static bool hmac(llarp_hash_t *result, llarp_buffer_t buff,
llarp_seckey_t secret) {
@ -109,6 +114,7 @@ void llarp_crypto_libsodium_init(struct llarp_crypto *c) {
c->transport_dh_client = llarp::sodium::transport_dh_client;
c->transport_dh_server = llarp::sodium::transport_dh_server;
c->hash = llarp::sodium::hash;
c->shorthash = llarp::sodium::shorthash;
c->hmac = llarp::sodium::hmac;
c->sign = llarp::sodium::sign;
c->verify = llarp::sodium::verify;

Loading…
Cancel
Save