mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-26 10:43:43 +00:00
crypto: md5 hash works without hmac mode
setup mbedtls_md_context_t with hmac disabled to save some memory.
This commit is contained in:
+1
-1
@@ -222,7 +222,7 @@ crypto_derive_key(const char *pass, uint8_t *key, size_t key_len)
|
||||
|
||||
if (pass == NULL)
|
||||
return key_len;
|
||||
if (mbedtls_md_setup(&c, md, 1))
|
||||
if (mbedtls_md_setup(&c, md, 0))
|
||||
return 0;
|
||||
|
||||
for (j = 0, addmd = 0; j < key_len; addmd++) {
|
||||
|
||||
Reference in New Issue
Block a user