picrypt.cpp no-sodium fix

picodeparser now recognize assignment in declaration
This commit is contained in:
2021-04-12 23:17:13 +03:00
parent 77477a1853
commit 7a2a9ee7d0
2 changed files with 23 additions and 6 deletions

View File

@@ -152,7 +152,7 @@ PIByteArray PICrypt::hash(const PIString & secret) {
#else
PICRYPT_DISABLED_WARNING
#endif
return hash;
return hash;
}
@@ -165,12 +165,17 @@ PIByteArray PICrypt::hash(const PIByteArray & data) {
#else
PICRYPT_DISABLED_WARNING
#endif
return hash;
return hash;
}
size_t PICrypt::sizeHash() {
#ifdef PIP_CRYPT
return crypto_generichash_BYTES;
#else
PICRYPT_DISABLED_WARNING
#endif
return 0;
}
@@ -246,7 +251,7 @@ void PICrypt::generateSignKeys(PIByteArray & public_key, PIByteArray & secret_ke
crypto_sign_keypair(public_key.data(), secret_key.data());
#else
PICRYPT_DISABLED_WARNING
#endif
#endif
}
@@ -258,7 +263,7 @@ void PICrypt::generateSignKeys(PIByteArray & public_key, PIByteArray & secret_ke
crypto_sign_seed_keypair(public_key.data(), secret_key.data(), hash(seed).data());
#else
PICRYPT_DISABLED_WARNING
#endif
#endif
}
@@ -294,8 +299,8 @@ bool PICrypt::verifySign(const PIByteArray & data, const PIByteArray & signature
return (crypto_sign_verify_detached(signature.data(), data.data(), data.size(), public_key.data()) == 0);
#else
PICRYPT_DISABLED_WARNING
return false;
#endif
return false;
}