I am using the example depth-bgvrns.cpp. However, I have string or char arrays as input in my use case instead of a vector of integers. I am stuck at the point where Plaintext is created.
In cryptocontext.h, there is a method for vectors of ints, but there are two static methods for the rest.
I used one of the static method
Plaintext plaintext2 = CryptoContextImpl::MakePlaintext(STRING_ENCODING,cryptoContext,keyValue);
Here, keyValue is a string
However, I get the following error. I see this method declared as a static method under public in the class. I bet I missed something.
error: ‘static lbcrypto::Plaintext lbcrypto::CryptoContextImpl::MakePlaintext(lbcrypto::PlaintextEncodings, lbcrypto::CryptoContext, const Value1&) [with Value1 = std::__cxx11::basic_string; Element = lbcrypto::DCRTPolyImpl<NTL::myVecPNTL::myZZ >; lbcrypto::Plaintext = std::shared_ptrlbcrypto::PlaintextImpl; lbcrypto::CryptoContext = std::shared_ptr<lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<NTL::myVecPNTL::myZZ > > >]’ is private within this context
155 | Plaintext plaintext2 = CryptoContextImpl::MakePlaintext( STRING_ENCODING,cryptoContext,keyValue);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/openfhe/pke/openfhe.h:54,
from
/usr/local/include/openfhe/pke/cryptocontext.h:271:22: note: declared private here
271 | static Plaintext MakePlaintext(PlaintextEncodings encoding, CryptoContext cc, const Value1& value) {