PICrypt passwordHash fix hash and return, PICloud repair Server exit, fix PIAuth pass_hash gen
This commit is contained in:
@@ -30,7 +30,7 @@ PIAuth::PIAuth(const PIByteArray & sign) : PIObject() {
|
||||
|
||||
|
||||
void PIAuth::setServerPassword(const PIString & ps) {
|
||||
pass_hash = crypt.passwordHash(ps, PIByteArray::fromHex("PIAuth"));
|
||||
pass_hash = crypt.passwordHash(ps, PIString("PIAuth").toByteArray());
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ PIAuth::State PIAuth::receive(PIByteArray & ba) {
|
||||
PIByteArray ph;
|
||||
passwordRequest(&ps);
|
||||
if (ps.isEmpty()) return disconnect(ba, "Canceled by user");
|
||||
ph = crypt.passwordHash(ps, PIByteArray::fromHex("PIAuth"));
|
||||
ph = crypt.passwordHash(ps, PIString("PIAuth").toByteArray());
|
||||
ps.fill(0);
|
||||
tba.clear();
|
||||
tba << ph << auth_sign << sign_pk;
|
||||
|
||||
Reference in New Issue
Block a user