@@ -22,7 +22,6 @@ class CBLSIESEncryptedBlob
2222 READWRITE (obj.ephemeralPubKey , obj.ivSeed , obj.data );
2323 }
2424
25- bool Encrypt (size_t idx, const CBLSPublicKey& peerPubKey, const void * data, size_t dataSize);
2625 bool Decrypt (size_t idx, const CBLSSecretKey& secretKey, CDataStream& decryptedDataRet) const ;
2726 bool IsValid () const ;
2827};
@@ -40,17 +39,6 @@ class CBLSIESEncryptedObject : public CBLSIESEncryptedBlob
4039 data = dataIn;
4140 }
4241
43- bool Encrypt (size_t idx, const CBLSPublicKey& peerPubKey, const Object& obj, int nVersion)
44- {
45- try {
46- CDataStream ds (SER_NETWORK, nVersion);
47- ds << obj;
48- return CBLSIESEncryptedBlob::Encrypt (idx, peerPubKey, ds.data (), ds.size ());
49- } catch (const std::exception&) {
50- return false ;
51- }
52- }
53-
5442 bool Decrypt (size_t idx, const CBLSSecretKey& secretKey, Object& objRet, int nVersion) const
5543 {
5644 CDataStream ds (SER_NETWORK, nVersion);
@@ -80,8 +68,6 @@ class CBLSIESMultiRecipientBlobs
8068 CBLSSecretKey ephemeralSecretKey;
8169 std::vector<uint256> ivVector;
8270
83- bool Encrypt (const std::vector<CBLSPublicKey>& recipients, const BlobVector& _blobs);
84-
8571 void InitEncrypt (size_t count);
8672 bool Encrypt (size_t idx, const CBLSPublicKey& recipient, const Blob& blob);
8773 bool Decrypt (size_t idx, const CBLSSecretKey& sk, Blob& blobRet) const ;
@@ -96,28 +82,6 @@ template <typename Object>
9682class CBLSIESMultiRecipientObjects : public CBLSIESMultiRecipientBlobs
9783{
9884public:
99- using ObjectVector = std::vector<Object>;
100-
101- bool Encrypt (const std::vector<CBLSPublicKey>& recipients, const ObjectVector& _objects, int nVersion)
102- {
103- BlobVector blobs;
104- blobs.resize (_objects.size ());
105-
106- try {
107- CDataStream ds (SER_NETWORK, nVersion);
108- for (size_t i = 0 ; i < _objects.size (); i++) {
109- ds.clear ();
110-
111- ds << _objects[i];
112- blobs[i].assign (UCharCast (ds.data ()), UCharCast (ds.data () + ds.size ()));
113- }
114- } catch (const std::exception&) {
115- return false ;
116- }
117-
118- return CBLSIESMultiRecipientBlobs::Encrypt (recipients, blobs);
119- }
120-
12185 bool Encrypt (size_t idx, const CBLSPublicKey& recipient, const Object& obj, int nVersion)
12286 {
12387 CDataStream ds (SER_NETWORK, nVersion);
0 commit comments