Skip to content

v1.12

Choose a tag to compare

@pylessard pylessard released this 29 Mar 02:16
· 175 commits to master since this release

New feature

  • #49 : Security level now passed to the security algorithm when using client.unlock_security_access. For backward compatibility, parameters are now given as named parameter. Only the parameters present in the algorithm signature will be passed. See the below snippet of code

      algo_params = {}
          try:
              algo_args =  self.config['security_algo'].__code__.co_varnames[:self.config['security_algo'].__code__.co_argcount]
          
              if 'seed' in algo_args:
                  algo_params['seed'] = seed
              if 'level' in algo_args:
                  algo_params['level'] = level
              if 'params' in algo_args:
                  algo_params['params'] = params
          except:
              algo_params = {'seed':seed, 'params' : params, 'level' : level}
    
      key = self.config['security_algo'].__call__(**algo_params)