mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-26 23:59:41 +08:00
Fix crypt passwords
This commit is contained in:
1 parent
b1d21cbdca
commit
6286bfcd6e
3 files changed
+6
-10
No files matched your search
+2
-4
@@ -202,15 +202,13 @@ unsigned char * mycrypt(const unsigned char *pw, const unsigned char *salt, unsi
|
||||
magic = (unsigned char *)"$3$";
|
||||
{
|
||||
blake2b_state S;
|
||||
unsigned char _b2tmp[64];
|
||||
if(blake2b_init(&S, 64) != 0 ||
|
||||
if(blake2b_init(&S, MD5_SIZE) != 0 ||
|
||||
blake2b_update(&S, pw, strlen((char *)pw) + 1) != 0 ||
|
||||
blake2b_update(&S, sp, sl) != 0 ||
|
||||
blake2b_final(&S, _b2tmp, 64) != 0) {
|
||||
blake2b_final(&S, final, MD5_SIZE) != 0) {
|
||||
*passwd = 0;
|
||||
return NULL;
|
||||
}
|
||||
memcpy(final, _b2tmp, MD5_SIZE);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in new issue
Block a user