picloud hash key

This commit is contained in:
2021-08-12 22:05:02 +03:00
parent 1a2e9afaef
commit 97b0b6fc0c
3 changed files with 18 additions and 2 deletions

View File

@@ -24,7 +24,7 @@
#include "pistreampacker.h"
const char hash_def_key[] = "_picrypt_";
const char hash_cloud_key[] = "_picloud_";
PICloud::TCP::Header::Header() {
@@ -43,7 +43,7 @@ void PICloud::TCP::setRole(PICloud::TCP::Role r) {
void PICloud::TCP::setServerName(const PIString & server_name_) {
server_name = server_name_;
suuid = PICrypt::hash(server_name_);
suuid = PICrypt::hash(PIByteArray(server_name_.data(), server_name_.size()), (const unsigned char *)hash_cloud_key, sizeof(hash_cloud_key));
}