Esempio n. 1
0
 def getDecryptedFile():
     """
         Retorna o conteudo do arquivo de configuracao
         caso nao exista gera uma excecao
     """
     cipher = CCrypt()
     return cipher.decrypt(IOConfig.getFile(IOConfig.FILE))
Esempio n. 2
0
 def getDecryptedFile():
     """
         Retorna o conteudo do arquivo de configuracao
         caso nao exista gera uma excecao
     """
     cipher = CCrypt()
     return cipher.decrypt(IOConfig.getFile(IOConfig.FILE))
Esempio n. 3
0
    def getRoot():
        """Retorna o node principal do XML"""
        if not IOConfig.exists():
            raise Exception("Arquivo de configuração não encontrado.")
        else:
            f = open(IOConfig.FILE)
            xmlstr = f.read()
            f.close()

            cipher = CCrypt()
            xmlstr = cipher.decrypt(xmlstr)

            xml = minidom.parseString(xmlstr)
            root = xml.getElementsByTagName("config")[0]
            return root
Esempio n. 4
0
    def getRoot():
        """Retorna o node principal do XML"""
        if not IOConfig.exists():
            raise Exception('Arquivo de configuração não encontrado.')
        else:
            f = open(IOConfig.FILE)
            xmlstr = f.read()
            f.close()

            cipher = CCrypt()
            xmlstr = cipher.decrypt(xmlstr)

            xml = minidom.parseString(xmlstr)
            root = xml.getElementsByTagName('config')[0]
            return root
Esempio n. 5
0
 def encryptFile(config):
     cipher = CCrypt()
     return cipher.encrypt(config)
Esempio n. 6
0
 def encryptFile(config):
     cipher = CCrypt()
     return cipher.encrypt(config)