code: def kdf(self):
          
  
          encryption_algo = self['algorithm'].native
  
          if encryption_algo == 'pbes2':
              return self['parameters']['key_derivation_func']['algorithm'].native
  
          if encryption_algo.find('.') == -1:
              if encryption_algo.find('_') != -1:
                  encryption_algo, _ = encryption_algo.split('_', 1)
  
                  if encryption_algo == 'pbes1':
                      return 'pbkdf1'
  
                  if encryption_algo == 'pkcs12':
                      return 'pkcs12_kdf'
  
              raise ValueError(unwrap(
                  '''
                  Encryption algorithm "%s" does not have a registered key
                  derivation function
                  ''',
                  encryption_algo
              ))
  
          raise ValueError(unwrap(
              '''
              Unrecognized encryption algorithm "%s", can not determine key
              derivation function
              ''',
              encryption_algo
          ))
docs: Returns the name of the key derivation function to use.
  
          :return:
              A unicode from of one of the following: "pbkdf1", "pbkdf2",
              "pkcs12_kdf"