PIString/PIChar explicit, support char16_t

This commit is contained in:
2023-07-06 19:59:26 +03:00
parent 8ad2503c5a
commit 61f1a34c14
11 changed files with 132 additions and 73 deletions

View File

@@ -238,7 +238,7 @@ PIAuth::State PIAuth::receive(PIByteArray & ba) {
rinfo = crypt.decrypt(rinfo, secret_key, &ok);
if (!ok) return disconnect(ba, "Error while exchange keys");
state = Connected;
connected(rinfo);
connected(PIString::fromUTF8(rinfo));
ba << (int)state << crypt.generateRandomBuff(randomi() % PIAUTH_NOISE_MAX_SIZE);
return state;
}