picrypt.cpp no-sodium fix
picodeparser now recognize assignment in declaration
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user