filesystem: use pySim.utils.build_construct()
We recently introduced a pySim.utils.build_construct() wrapper around the raw call of the construct.build() method. So far, this wrapper was only used from pySim.tlv, but let's also use it from pySim.filesystem. Basically, whenever we use parse_construct(), we should use build_construct() as the inverse operation. Change-Id: Ibfd61cd87edc72882aa66d6ff17861a3e918affb
This commit is contained in:
@@ -237,9 +237,9 @@ class EF_USIM_AUTH_KEY(TransparentEF):
|
||||
|
||||
def _encode_bin(self, abstract_data: dict) -> bytearray:
|
||||
if abstract_data['cfg']['algorithm'] == 'tuak':
|
||||
return self._constr_tuak.build(abstract_data)
|
||||
return build_construct(self._constr_tuak, abstract_data)
|
||||
else:
|
||||
return self._construct.build(abstract_data)
|
||||
return build_construct(self._construct, abstract_data)
|
||||
|
||||
|
||||
class EF_USIM_AUTH_KEY_2G(TransparentEF):
|
||||
|
||||
Reference in New Issue
Block a user