(g`TddlZddlmZmZmZddlmZGddejZdS)N)b2hh2bHexstr)ResTupleczeZdZejdedefdZejdededefdZdede de fd Z d S) SecureChannelapdureturncdS)z@Wrap Command APDU according to specific Secure Channel Protocol.N)selfr s B/home/jenkins/workspace/simtester-sanitize/pySim/secure_channel.py wrap_cmd_apduzSecureChannel.wrap_cmd_apdu  swrsp_apducdS)zCUnWrap Response-APDU according to specific Secure Channel Protocol.Nr )r rrs runwrap_rsp_apduzSecureChannel.unwrap_rsp_apdurrsend_fnpduct|t|}||g|Ri|\}}t|t|t|}||fS)zYWrapper function to wrap command APDU and unwrap repsonse APDU around send_apdu callable.)rrrr) r rrargskwargs pdu_wrappedresr res_unwrappeds rsend_apdu_wrapperzSecureChannel.send_apdu_wrapper"sz$,,SXX6677 '+777777RD00R#c((CCDD b  rN) __name__ __module__ __qualname__abcabstractmethodbytesrrcallablerrrr rrrrs % E      % 5 U    !!!T\!!!!!!rr) r" osmocom.utilsrrr pySim.utilsrABCrr rrr)sv$ ********** !!!!!CG!!!!!r