def _getSupportedCiphers():
 supportedCiphers = []
 cs = ['aes256-ctr', 'aes256-cbc', 'aes192-ctr', 'aes192-cbc', 'aes128-ctr', 'aes128-cbc', 'cast128-ctr', 'cast128-cbc', 'blowfish-ctr', 'blowfish-cbc', '3des-ctr', '3des-cbc']
 for cipher in cs:
  (algorithmClass, keySize, modeClass) = SSHCiphers.cipherMap[cipher]
  try:
   Cipher(algorithmClass((' ' * keySize)), modeClass((' ' * (algorithmClass.block_size // 8))), backend=default_backend()).encryptor()
  except UnsupportedAlgorithm:
   pass
  else:
   supportedCiphers.append(cipher)
 return supportedCiphers

def _getSupportedCiphers ( ) : supportedCiphers = [ ] cs = [ 'aes256-ctr' , 'aes256-cbc' , 'aes192-ctr' , 'aes192-cbc' , 'aes128-ctr' , 'aes128-cbc' , 'cast128-ctr' , 'cast128-cbc' , 'blowfish-ctr' , 'blowfish-cbc' , '3des-ctr' , '3des-cbc' ] for cipher in cs : ( algorithmClass , keySize , modeClass ) = SSHCiphers . cipherMap [ cipher ] try : Cipher ( algorithmClass ( ( ' ' * keySize ) ) , modeClass ( ( ' ' * ( algorithmClass . block_size // 8 ) ) ) , backend = default_backend ( ) ) . encryptor ( ) except UnsupportedAlgorithm : pass else : supportedCiphers . append ( cipher ) return supportedCiphers
build a list of ciphers that are supported by the backend in use .