6 #ifndef PIVX_BLS_BLS_IES_H
7 #define PIVX_BLS_BLS_IES_H
19 std::vector<unsigned char>
data;
39 template <
typename Object>
53 }
catch (std::exception&) {
66 }
catch (std::exception& e) {
78 typedef std::vector<unsigned char>
Blob;
91 bool Encrypt(
const std::vector<CBLSPublicKey>& recipients,
const BlobVector& _blobs);
107 template <
typename Object>
117 blobs.resize(_objects.size());
121 for (
size_t i = 0; i < _objects.size(); i++) {
127 }
catch (std::exception&) {
153 }
catch (std::exception&) {
std::vector< unsigned char > data
CBLSPublicKey ephemeralPubKey
bool Decrypt(const CBLSSecretKey &secretKey, CDataStream &decryptedDataRet) const
bool Encrypt(const CBLSPublicKey &peerPubKey, const void *data, size_t dataSize)
SERIALIZE_METHODS(CBLSIESEncryptedBlob, obj)
bool Decrypt(const CBLSSecretKey &secretKey, Object &objRet, int nVersion) const
bool Encrypt(const CBLSPublicKey &peerPubKey, const Object &obj, int nVersion)
void InitEncrypt(size_t count)
CBLSSecretKey ephemeralSecretKey
bool Encrypt(const std::vector< CBLSPublicKey > &recipients, const BlobVector &_blobs)
SERIALIZE_METHODS(CBLSIESMultiRecipientBlobs, obj)
CBLSPublicKey ephemeralPubKey
bool Decrypt(size_t idx, const CBLSSecretKey &sk, Blob &blobRet) const
std::vector< uint256 > ivVector
std::vector< Blob > BlobVector
std::vector< unsigned char > Blob
bool Encrypt(const std::vector< CBLSPublicKey > &recipients, const ObjectVector &_objects, int nVersion)
bool Encrypt(size_t idx, const CBLSPublicKey &recipient, const Object &obj, int nVersion)
std::vector< Object > ObjectVector
bool Decrypt(size_t idx, const CBLSSecretKey &sk, Object &objectRet, int nVersion) const
const_iterator end() const
const_iterator begin() const
#define SER_WRITE(obj, code)
#define SER_READ(obj, code)