PALISADE Lattice Crypto Library  1.11.9
A lattice crypto library for software engineers by software engineers.
Public Member Functions | List of all members
lbcrypto::StringEncoding Class Reference
Inheritance diagram for lbcrypto::StringEncoding:
Inheritance graph
[legend]
Collaboration diagram for lbcrypto::StringEncoding:
Collaboration graph
[legend]

Public Member Functions

 StringEncoding (shared_ptr< Poly::Params > vp, EncodingParams ep)
 
 StringEncoding (shared_ptr< NativePoly::Params > vp, EncodingParams ep)
 
 StringEncoding (shared_ptr< DCRTPoly::Params > vp, EncodingParams ep)
 
 StringEncoding (shared_ptr< Poly::Params > vp, EncodingParams ep, string str)
 
 StringEncoding (shared_ptr< NativePoly::Params > vp, EncodingParams ep, string str)
 
 StringEncoding (shared_ptr< DCRTPoly::Params > vp, EncodingParams ep, string str)
 
const string & GetStringValue () const
 
void SetStringValue (const std::string &value)
 
bool Encode ()
 
bool Decode ()
 
PlaintextEncodings GetEncodingType () const
 
size_t GetLength () const
 
bool CompareTo (const PlaintextImpl &other) const
 
void PrintValue (std::ostream &out) const
 
- Public Member Functions inherited from lbcrypto::PlaintextImpl
 PlaintextImpl (shared_ptr< Poly::Params > vp, EncodingParams ep, bool isEncoded=false)
 
 PlaintextImpl (shared_ptr< NativePoly::Params > vp, EncodingParams ep, bool isEncoded=false)
 
 PlaintextImpl (shared_ptr< DCRTPoly::Params > vp, EncodingParams ep, bool isEncoded=false)
 
 PlaintextImpl (const PlaintextImpl &rhs)
 
 PlaintextImpl (const PlaintextImpl &&rhs)
 
double GetScalingFactor () const
 
void SetScalingFactor (double sf)
 
bool IsEncoded () const
 
const EncodingParams GetEncodingParams () const
 
int64_t LowBound () const
 
int64_t HighBound () const
 
void SetFormat (Format fmt) const
 
template<typename Element >
Element & GetElement ()
 
template<typename Element >
const Element & GetElement () const
 
usint GetElementRingDimension () const
 
const BigInteger GetElementModulus () const
 
virtual void SetLength (size_t newSize)
 
size_t GetDepth () const
 
void SetDepth (size_t d)
 
size_t GetLevel () const
 
void SetLevel (size_t l)
 
virtual double GetLogError () const
 
virtual double GetLogPrecision () const
 
virtual const vector< int64_t > & GetCoefPackedValue () const
 
virtual const vector< int64_t > & GetPackedValue () const
 
virtual const std::vector< std::complex< double > > & GetCKKSPackedValue () const
 
virtual const std::vector< double > GetRealPackedValue () const
 
virtual void SetIntVectorValue (const vector< int64_t > &)
 
bool operator== (const PlaintextImpl &other) const
 
bool operator!= (const PlaintextImpl &other) const
 
template<>
const PolyGetElement () const
 
template<>
PolyGetElement ()
 
template<>
const NativePolyGetElement () const
 
template<>
NativePolyGetElement ()
 
template<>
const DCRTPolyGetElement () const
 
template<>
DCRTPolyGetElement ()
 

Additional Inherited Members

- Protected Attributes inherited from lbcrypto::PlaintextImpl
bool isEncoded
 
PtxtPolyType typeFlag
 
EncodingParams encodingParams
 
Poly encodedVector
 
NativePoly encodedNativeVector
 
DCRTPoly encodedVectorDCRT
 
double scalingFactor
 
size_t level
 
size_t depth
 
- Static Protected Attributes inherited from lbcrypto::PlaintextImpl
static const int intCTOR = 0x01
 
static const int vecintCTOR = 0x02
 
static const int fracCTOR = 0x04
 
static const int vecuintCTOR = 0x08
 

Member Function Documentation

◆ CompareTo()

bool lbcrypto::StringEncoding::CompareTo ( const PlaintextImpl other) const
inlinevirtual

Method to compare two plaintext to test for equivalence Testing that the plaintexts are of the same type done in operator==

Parameters
other- the other plaintext to compare to.
Returns
whether the two plaintext are equivalent.

Implements lbcrypto::PlaintextImpl.

◆ Decode()

bool lbcrypto::StringEncoding::Decode ( )
virtual

Decode the Poly into the string

Returns
true on success

Implements lbcrypto::PlaintextImpl.

◆ Encode()

bool lbcrypto::StringEncoding::Encode ( )
virtual

Encode the plaintext into the Poly

Returns
true on success

Implements lbcrypto::PlaintextImpl.

◆ GetEncodingType()

PlaintextEncodings lbcrypto::StringEncoding::GetEncodingType ( ) const
inlinevirtual

GetEncodingType

Returns
this is a String encoding

Implements lbcrypto::PlaintextImpl.

◆ GetLength()

size_t lbcrypto::StringEncoding::GetLength ( ) const
inlinevirtual

Get length of the plaintext

Returns
number of elements in this plaintext

Implements lbcrypto::PlaintextImpl.

◆ GetStringValue()

const string& lbcrypto::StringEncoding::GetStringValue ( ) const
inlinevirtual

GetStringValue

Returns
the un-encoded string

Reimplemented from lbcrypto::PlaintextImpl.

◆ PrintValue()

void lbcrypto::StringEncoding::PrintValue ( std::ostream &  out) const
inlinevirtual

PrintValue - used by operator<< for this object

Parameters
out

Implements lbcrypto::PlaintextImpl.

◆ SetStringValue()

void lbcrypto::StringEncoding::SetStringValue ( const std::string &  value)
inlinevirtual

SetStringValue

Parameters
valto initialize the Plaintext

Reimplemented from lbcrypto::PlaintextImpl.


The documentation for this class was generated from the following files: