コード例 #1
0
    public string getMeshFileData(int index, string strKey)
    {
        if (index < 0 || index > m_noFiles)
        {
            return("No file with index = " + index);
        }

        string strStatement = "SELECT DATA FROM MESH WHERE ID = " + index;
        string returnValue  = null;

        returnValue = Database.readMeshFromDataBase(strStatement);

        model.Encryption enc = new model.Encryption();
        returnValue = enc.encryptString(returnValue, strKey);

        return(returnValue);
    }
コード例 #2
0
    public string getGemstoneFileContent(int index, string strKey)
    {
        if (index < 0 || index > m_noFiles)
        {
            return("No file with index = " + index);
        }

        string strStatement = "SELECT CONTENT FROM Gemstone WHERE ID = " + index;
        string returnValue  = null;

        returnValue = Database.readFromDataBase(strStatement);

        model.Encryption enc = new model.Encryption();
        returnValue = enc.encryptString(returnValue, strKey);

        return(returnValue);
    }