(key_file)
return False
Detects if a key file is encrypted or not.
Detects if a key file is encrypted or not.
Detects if a key file is encrypted or not .
def _is_key_file_encrypted(key_file):
    """Detects if a key file is encrypted or not."""
    with open(key_file, 'r') as f:
        for line in f:
            # Look for Proc-Type: 4,ENCRYPTED
            if 'ENCRYPTED' in line:
                return True

    return False
def _is_key_file_encrypted ( key_file ) : with open ( key_file , 'r' ) as f : for line in f : # Look for Proc-Type: 4,ENCRYPTED if 'ENCRYPTED' in line : return True return False