@@ -72,9 +72,9 @@ class System implements ConfigTypeInterface
72
72
private $ availableDataScopes ;
73
73
74
74
/**
75
- * @var \Magento\Framework\Filter\Encrypt\AdapterInterface
75
+ * @var Encryptor
76
76
*/
77
- private $ encryptorFilter ;
77
+ private $ encryptor ;
78
78
79
79
/**
80
80
* @param ConfigSourceInterface $source
@@ -108,7 +108,7 @@ public function __construct(
108
108
$ this ->serializer = $ serializer ;
109
109
$ this ->configType = $ configType ;
110
110
$ this ->reader = $ reader ?: ObjectManager::getInstance ()->get (Reader::class);
111
- $ this ->encryptorFilter = ObjectManager::getInstance ()->get (\Magento \Framework \Encryption \Encryptor::class);
111
+ $ this ->encryptor = ObjectManager::getInstance ()->get (\Magento \Framework \Encryption \Encryptor::class);
112
112
}
113
113
114
114
/**
@@ -198,7 +198,7 @@ private function loadAllData()
198
198
if ($ cachedData === false ) {
199
199
$ data = $ this ->readData ();
200
200
} else {
201
- $ data = $ this ->serializer ->unserialize ($ this ->encryptorFilter ->decrypt ($ cachedData ));
201
+ $ data = $ this ->serializer ->unserialize ($ this ->encryptor ->decrypt ($ cachedData ));
202
202
}
203
203
204
204
return $ data ;
@@ -218,7 +218,7 @@ private function loadDefaultScopeData($scopeType)
218
218
$ data = $ this ->readData ();
219
219
$ this ->cacheData ($ data );
220
220
} else {
221
- $ data = [$ scopeType => $ this ->serializer ->unserialize ($ this ->encryptorFilter ->decrypt ($ cachedData ))];
221
+ $ data = [$ scopeType => $ this ->serializer ->unserialize ($ this ->encryptor ->decrypt ($ cachedData ))];
222
222
}
223
223
224
224
return $ data ;
@@ -239,7 +239,7 @@ private function loadScopeData($scopeType, $scopeId)
239
239
if ($ this ->availableDataScopes === null ) {
240
240
$ cachedScopeData = $ this ->cache ->load ($ this ->configType . '_scopes ' );
241
241
if ($ cachedScopeData !== false ) {
242
- $ serializedCachedData = $ this ->encryptorFilter ->decrypt ($ cachedScopeData );
242
+ $ serializedCachedData = $ this ->encryptor ->decrypt ($ cachedScopeData );
243
243
$ this ->availableDataScopes = $ this ->serializer ->unserialize ($ serializedCachedData );
244
244
}
245
245
}
@@ -249,7 +249,7 @@ private function loadScopeData($scopeType, $scopeId)
249
249
$ data = $ this ->readData ();
250
250
$ this ->cacheData ($ data );
251
251
} else {
252
- $ serializedCachedData = $ this ->encryptorFilter ->decrypt ($ cachedData );
252
+ $ serializedCachedData = $ this ->encryptor ->decrypt ($ cachedData );
253
253
$ data = [$ scopeType => [$ scopeId => $ this ->serializer ->unserialize ($ serializedCachedData )]];
254
254
}
255
255
@@ -267,12 +267,12 @@ private function loadScopeData($scopeType, $scopeId)
267
267
private function cacheData (array $ data )
268
268
{
269
269
$ this ->cache ->save (
270
- $ this ->encryptorFilter -> encryptWithFastestAlgorithm ($ this ->serializer ->serialize ($ data )),
270
+ $ this ->encryptor -> encryptWithFastestAvailableAlgorithm ($ this ->serializer ->serialize ($ data )),
271
271
$ this ->configType ,
272
272
[self ::CACHE_TAG ]
273
273
);
274
274
$ this ->cache ->save (
275
- $ this ->encryptorFilter -> encryptWithFastestAlgorithm ($ this ->serializer ->serialize ($ data ['default ' ])),
275
+ $ this ->encryptor -> encryptWithFastestAvailableAlgorithm ($ this ->serializer ->serialize ($ data ['default ' ])),
276
276
$ this ->configType . '_default ' ,
277
277
[self ::CACHE_TAG ]
278
278
);
@@ -281,14 +281,14 @@ private function cacheData(array $data)
281
281
foreach ($ data [$ curScopeType ] ?? [] as $ curScopeId => $ curScopeData ) {
282
282
$ scopes [$ curScopeType ][$ curScopeId ] = 1 ;
283
283
$ this ->cache ->save (
284
- $ this ->encryptorFilter -> encryptWithFastestAlgorithm ($ this ->serializer ->serialize ($ curScopeData )),
284
+ $ this ->encryptor -> encryptWithFastestAvailableAlgorithm ($ this ->serializer ->serialize ($ curScopeData )),
285
285
$ this ->configType . '_ ' . $ curScopeType . '_ ' . $ curScopeId ,
286
286
[self ::CACHE_TAG ]
287
287
);
288
288
}
289
289
}
290
290
$ this ->cache ->save (
291
- $ this ->encryptorFilter -> encryptWithFastestAlgorithm ($ this ->serializer ->serialize ($ scopes )),
291
+ $ this ->encryptor -> encryptWithFastestAvailableAlgorithm ($ this ->serializer ->serialize ($ scopes )),
292
292
$ this ->configType . '_scopes ' ,
293
293
[self ::CACHE_TAG ]
294
294
);
0 commit comments