Giter Club home page Giter Club logo

sqliteforunity's Introduction

SqliteForUnity

Sqlite3 for Unity with AES encryption

After trying out alot of sqlite3 libs/plugins for Unity, I couldn't find any that supported encryption, was free and was easy to use. However there were some good ones out there that I forked and added encryption support to it.

Can't Wait ?

Download Unity Packages - Unity 5 | Unity 4.6 Pro

Quick Facts:

  • SqliteForUnity provides sqlite support for Unity3D (5.0 & 4.6 Pro) with encryption
  • Download project folders to try out the sample scenes Unity 5,Unity 4.6 Pro
  • Support for x86/x64/Android
  • Plugins folder contains SqliteForUnity3D.dll,libsqlite3.so(for Android),sqlite.dll(both x8enc6/x64) with encryption support

Sample Scene - [Android]

alt tag alt tag alt tag

Usage

Usage is similiar to sqlite-net & SQLite4Unity3d. Reiterating it here -

using UnityEngine;
using System.Collections;
using SqliteForUnity3D;

public class PStudent {
	[PrimaryKey]
	public string Id { get;set; }
	public string Name { get;set; }
}

//Creating Tables & Inserting
var factory = new ConnectionFactory();
.....
_connection = factory.Create(dbPath);
_connection.CreateTable<PStudent> ();
_connection.Insert(new PStudent{
    Id = "XYZ",
    Name = "John"
});

//This uses Linq Reflections , please avoid using on iOS
_connection.Table<PStudent> ().Where (x => x.Name == "John").FirstOrDefault ();
//Instead
string name = "John";
_connection.Query<PStudent>(string.Format("select * from PStudent where Name = {0}",name));

Encryption

//To lock db
_connection.SetDbKey(key);
// To unlock db
_connection.Key(key);

SqliteForUnity Source

SqliteForUnity is a fork of https://github.com/codecoding/SQLite4Unity3d by @CodeCoding. A wrapper around the great c# client for sqlite - sqlite-net by @praeclarum

x86/x64 Encryption The encryption is based on AES similiar to the one used by https://github.com/rindeal/SQLite3-Encryption (Infact you can use sqlite3.dll by @rindeal too).

Android Encryption For Android I compiled the sqlite3 src with the encryption from @rindeal for both armeabi & x86 platform. I have included the source here.

#TODO

  1. To add support for Windows Phone 8.1/8
  2. To test it on iOS

sqliteforunity's People

Contributors

mdragon159 avatar shreks7 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.