- 博客(35)
- 资源 (7)
- 收藏
- 关注
原创 Sqlite 3.7.14.1 xxtea 加密算法
http://blog.csdn.net/wzq9706/article/details/8133314最近在研空Sqlite加密算法,东拼西凑,还没研究出AES怎么用,欢迎指正,交流1.从官方下载最新版本的Sqlite目前www.sqlite.org是:如sqlite-amalgamation-3071401.zip2.在VS中添加一个空项目3.解压sqlite-
2012-10-31 16:55:59 3365
转载 SQLite 3.7.13的加密解密(七)—— 遗留问题
现象与原因采用上面的方法对数据库进行加密,存在页面尺寸错乱的问题。在SQLite的DB文件中,第16、17两个字节的值表示数据库中每个页的大小,SQLite规定页大小必须是512的倍数,如果加密算法恰好导致这两个字节的值为512的倍数,且与数据库的实际页面大小不一样,就会导致不能进行数据库操作。其原因是在sqlite3_open()函数中,会读取DB文件头,从16、17字节得到页大小,但是
2012-10-30 14:10:42 1161
转载 SQLite 3.7.13的加密解密(六)—— 使用方法
采用上一节的方法为SQLite添加了加密解密功能后,使用方法如下:1、 在调用sqlite3_open()函数打开数据库后,要调用sqlite3_key()函数为数据库设置密码;2、 如果数据库之前有密码,则调用sqlite3_key()函数设置正确密码才能正常工作;3、 如果一个数据库之前没有密码,且已经有数据,则不能再为其设置密码;4、 如果要修改密码,则需要在第一步操作后,调
2012-10-30 14:09:42 4745
转载 SQLite 3.7.13的加密解密(五)—— 修正编译错误和警告
上面的代码是从网上下载下来的,它使用的SQLite版本比较旧,因此在SQLite 3.7.13下编译不通过,下面需要对编译错误和警告逐一修正。编译信息原因与修改方法'Pager' has no member named 'pCodecArg'在3.7.13版本中,Pager的成员变量pCodecArg名称修改为pCodec,因此用到p
2012-10-30 14:07:37 1218 2
转载 SQLite 3.7.13的加密解密(四)—— 挂接加密解密函数
把crypt.c中实现的加密解密函数挂接到sqlite3.c中,并且实现前面编译提示的未实现的函数。在sqlite3.c的最后一行的后面,添加如下代码:#ifdef SQLITE_HAS_CODEC#include "crypt.h" /*** 加密结构 ***/#define CRYPT_OFFSET 8typedef struct _CryptB
2012-10-30 14:06:55 1092
转载 SQLite 3.7.13的加密解密(三)—— 创建加密解密函数
先不用管上面的编译错误,创建crypt.c和crypt.h,用来实现加密解密函数和相应接口的定义。crypt.c里实现了加密解密函数,代码如下:#include "crypt.h"#include "memory.h" /*********** 关键加密函数 ***********/int My_Encrypt_Func(unsigned char
2012-10-30 14:06:09 1215 1
转载 SQLite 3.7.13的加密解密(二)—— 开放宏定义
首先要在sqlite3.c中最前面,添加代码(网上有说在sqlite3.h中添加也可,实际测试在sqlite3.h中打开该宏是无效的):#ifndef SQLITE_HAS_CODEC#define SQLITE_HAS_CODEC#endif 这个宏是用来确定是否支持加密的。添加上述代码后编译,会出现如下错误:D:\Rese
2012-10-30 14:05:17 1636
转载 SQLite 3.7.13的加密解密(一)—— 前言
SQLite数据库支持加密和解密,但是免费版没有这个功能,不过网上已经有相关的资料,不过这些资料都不是基于SQLite 3.7.13版本的,这里根据网上找到的最全的资料进行整理,实现了SQLite 3.7.13版数据库的加密解密。本系列文章对此进行了详细说明。开发环境:操作系统Win 7IDEEclipse Juno (4.2
2012-10-30 14:04:53 891
转载 Sqlite xxteacrypt.c代码
http://bbs.2ccc.com/topic.asp?topicid=337891今天刚好改 风铃兄 的sqlite,随便说说,不对的请大家指正.sqlite3PagerSetCodec变化非常大static void sqlite3PagerSetCodec( Pager *pPager, void *(*xCodec)(void*,void*,Pg
2012-10-30 10:55:54 1147
转载 SQLITE3 使用总结
http://www.sqlite.com.cn/MySqlite/6/407.Html前序:一、 版本二、 基本编译三、 SQLITE操作入门(1) 基本流程(2) SQL语句操作(3) 操作二进制(4) 事务处理四、 给数据库加密五、 后记 前序
2012-10-30 09:52:14 556
转载 SQLITE3 使用总结
2.语句操作本节介绍如何用sqlite 执行标准 sql 语法。 i.1 执行sql语句int sqlite3_exec(sqlite3*, const char *sql, sqlite3_callback, void *, char **errmsg );这就是执行一条 sql 语句的函数。第1个参数不再说了,是前面open函数得到的指针。说了是
2012-10-30 09:49:29 557
转载 董淳光之SQLITE3 使用总结(3)
http://www.sqlite.com.cn/MySqlite/6/409.Html4.事务处理sqlite 是支持事务处理的。如果你知道你要同步删除很多数据,不仿把它们做成一个统一的事务。通常一次 sqlite3_exec 就是一次事务,如果你要删除1万条数据,sqlite就做了1万次:开始新事务->删除一条数据->提交事务->开始新事务->… 的过程。这个操作是很慢
2012-10-30 09:46:44 1044
转载 董淳光之SQLITE3 使用总结(4)
http://www.sqlite.com.cn/MySqlite/6/410.Html/*** 下面是编译时提示缺少的函数 ***/ /** 这个函数不需要做任何处理,获取密钥的部分在下面 DeriveKey 函数里实现 **/void sqlite3CodecGetKey(sqlite3* db, int nDB, void** Key, int* nKey){retu
2012-10-30 09:41:14 706
转载 董淳光之SQLITE3 使用总结(5)
http://www.sqlite.com.cn/MySqlite/6/411.Htmlint sqlite3_key(sqlite3 *db, const void *pKey, int nKey){return sqlite3_key_interop(db, pKey, nKey);} int sqlite3_rekey(sqlite3 *db, const
2012-10-29 18:03:09 1164
转载 Windows下使用nmake编译C/C++的makefile
现在大多时候在Linux上做服务器端开发,使用VC的机会少了很多。VC编程时习惯上会间个小工程去测试一些小段代码,确保正确后在移植到真正的工程上去。自觉这是个好习惯,决定继续沿用。公司开发环境不提供VC,自己也懒得动用复杂的IDE,想想还是启用nmake。研究了一番nmake的makefile规则,编写了了一个通用makefile。用下来还相当好用。存个档,作个分享交流。
2012-10-29 14:37:29 4270
转载 编译静态库和动态库的Makefile文件
写了一个编译静态库和动态库的Makefile文件,修改Makefile中STATIC的值可以编译静态库或动态库。完整的程序和Makefile文件在这里。 MakefileSTATIC=0LIBPATH=libCFLAGS=-WallLDFLAGS=-I$(LIBPATH) -L$(LIBPATH) -lfuncifeq ($(STATIC), 1)LIB=$(L
2012-10-29 13:44:32 1239
转载 为跨平台数据库引擎 SQLite 实现加密扩展《转》
SQLite 简介SQLite 是非常优秀的跨平台数据库引擎。与最常见的需要服务进程的数据库引擎(如 MySQL )不同,SQLite 引擎不是独立的进程,而是与主程序编译在一起、并运行在同一个进程空间中的代码。数据的存取则是通过程序内直接调用其 API 实现的,整个数据库都在宿主主机上存储在一个单一的文件中。这些使得 SQLite 在读写效率、消耗总量、延迟时间和整体简单性上具有
2012-10-29 10:35:17 1003
原创 自已在别人基础上封装的AES数法 C++
myAes.h文件为了方便使用从别人的C语言版本上封装的(C语言版本),如果有什么不对,请帮忙指正出来,自身对加密并不是很懂原文地址: http://blog.csdn.net/wzq9706/article/details/8119112//// myAes.h// //// Created by X on 12-10-27.// Copyright (c)
2012-10-27 18:08:52 4958 1
原创 C Aes 算法
I am not sure if C source code of aes implement is OK for you.Here is a link you can download an AES sourcehttp://www.cis.syr.edu/~wedu/seed/Labs/IPSec/files/libcrypt.tarThe aes.c and aes.h in f
2012-10-27 14:12:10 3360
转载 c++实现aes加密算法,对字符串进行加密
我的blog中,已经写过一篇关于aes加密算法的调用。不过使用的参数必须时unsigned char类型。我们在编程中使用最多的char类型,我从网上下载了一个代码,追加了一部分代码。 其主要功能进行实现unsigned char类型数据到char类型转化,将unsigned char结果与16进制字符串串之间的转化。代码如下:点击(此处)折叠或打开
2012-10-27 11:04:47 4347 2
转载 [iOS]AES加密在iOS上面的实现
Encryption.h文件 #import @class NSString; @interface NSData (Encryption) - (NSData *)AES256EncryptWithKey:(NSString *)key; //加密- (NSData *)AES256DecryptWithKey:(NSString *)key;
2012-10-26 17:25:38 2424 2
转载 【iOS-Cocos2d游戏开发之十九】游戏数据存储的四种常用方式NSKeyedArchiver/NSUserDefaults/Write写入/SQLite3
李华明Himi 原创,转载务必在明显处注明:转载自【黑米GameDev街区】 原文链接: http://www.himigame.com/iphone-cocos2d/513.htmlOK,今天Himi介绍游戏存储这一块,在Android游戏开发中Himi介绍了好几种保存的方式和形式,那么在iOS中也有几种方式,一般常用的有以下四种形式: 1. NSKeyed
2012-10-26 17:24:22 583
转载 【iOS开发必收藏】详解iOS应用程序内使用IAP/StoreKit付费、沙盒(SandBox)测试、创建测试账号流程!【2012-6-25日更新iap恢复详解】
Himi 原创, 欢迎转载,转载请在明显处注明! 谢谢。 原文地址:http://blog.csdn.net/xiaominghimi/article/details/6937097//——2012-6-25日更新iap恢复看到很多童鞋说让Himi讲解如何恢复iap产品,其实博文已经给出了。这里再详细
2012-10-21 23:20:48 1566
转载 【iOS开发必收藏】详解iOS应用程序内使用IAP/StoreKit付费、沙盒(SandBox)测试、创建测试账号流程!【2012-6-25日更新iap恢复详解】
Himi 原创, 欢迎转载,转载请在明显处注明! 谢谢。 原文地址:http://blog.csdn.net/xiaominghimi/article/details/6937097//——2012-6-25日更新iap恢复看到很多童鞋说让Himi讲解如何恢复iap产品,其实博文已经给出了。这里再详细
2012-10-21 23:17:42 1195
转载 基于Game Center的多人游戏简介
Game Center的高级开发是建立多人实时联网的比赛。开发者可以选择使用Game Center提供的服务器来运行游戏,或者使用自己的服务器来作数据并发。由于我的案例是选择了前者,所以本文只对使用Game Center提供的服务器来介绍。在Game Center中可以有选择地邀请好友,或者让服务器自己来寻找匹配的玩家。如果是邀请好友,首先两者必须在Game Center中是互为好友的关系
2012-10-21 21:46:29 3996
转载 GameCenter 使用指南
原文 GameCenter 为单机游戏为主的 iPhone 游戏平台引入了社会化特性,更为将来的网游、多人竞技等游戏打下了基础。下面是 CocoaChina 会员 “ljg420811” 总结的 GameCenter 使用指南,包括 GameCenter 的设置和代码实现。1. iTunes Connect 设置 首先,申请一个应用程序,不必提交.目地是为了得到
2012-10-21 21:23:18 2261
转载 基于cocos2d-x引擎的游戏框架设计
文/李成,郑鑫移动互联网浪潮正在彻底改变人们日常的生活习惯和生活方式。相应的,基于移动终端和感应交互的游戏,也为人们带来了全新的游戏体验。本文,我们将结合目前流行的cocos2d-x引擎,使用C++语言,基于iOS平台,和大家分享iPhone、iPad上游戏客户端的构架与实现。游戏架构与实现目前,很多基于cocos2d-x的代码基本上仅是对引擎功能的使用,完全不能按照游戏项
2012-10-21 18:04:21 820
原创 IOS发布问题
登录iTurns Connect时:Apple ID does not have permission to access iTunes Connect先登入到Member Center,然后,点击Your account,Update your profile,把Apple ID修改成原来的ID后保存。然后可以了。
2012-10-21 16:19:27 566
转载 iOS开发者的申请流程
如果你是一个开发团队,在你打算掏腰包购买iOS开发者授权之前,最好先问一下你的同事,是否已经有人获得了开发许可,因为一个开发许可一年内最多可以授权给111个设备来开发测试。如果你没有授权许可可以借用,或者你打算最终在iTunes Store中以自己的名义发布你的应用,那么就准备一张国际信用卡,准备支付99美元来申请一个iOS开发者授权。点击下面链接进入Apple Developer Cen
2012-10-21 11:52:07 976
转载 IOS开发者证书配置和安装。。。
这个是证书,我们先从这里一次开始向下 一步一步的配置。点这里,会下载一个.cer的证书文件下来。。。然后双击这个下载下来的证书,安装到登录钥匙串。。。看到没有? 这个就是安装好后的证书。这个证书就不用管了。。。接着来点击 钥匙串 - 》证书助理 - 从证书机构请求证书,然
2012-10-21 11:46:57 663
转载 AppStore程序发布过程总结
----从申请账号到app store发布要想在iphone上安装自己开发的app程序,有两种方法可以实行:1、越狱后自己安装;2、成为ios developer并发布自己的程序,所有人都可以安装。固然,越狱有很多方便之处,可以从网络中搜集各种不同的程序安装到自己的iphone上,但越狱也会有些地方令人遗憾:繁琐、不安全。越狱的步骤是繁琐的,而越狱,是将自己iphone的诸多权限开放给未经
2012-10-21 11:36:41 851
转载 iphone开发证书 纠结许久
原文地址:http://tie.youdao.com/st_3979529905881611380对于真机调试,首先要在苹果网站上注册APP ID,以及购买iPhone Develop Program(iDP) 开发者授权,99美元。然后要创建证书请求CSR,创建步骤如下:设置OCSP和CRL为关闭状态。Mac OS 中,打开应用程序,找到 钥匙串访问(Keycha
2012-10-18 23:08:11 666
转载 iphone__game center 多人游戏
免责申明(必读!):本博客提供的所有教程的翻译原稿均来自于互联网,仅供学习交流之用,切勿进行商业传播。同时,转载时不要移除本申明。如产生任何纠纷,均与本博客所有人、发表该翻译稿之人无任何关系。谢谢合作!原文链接地址:http://www.raywenderlich.com/3276/how-to-make-a-simple-multiplayer-game-with-game-center
2012-10-18 22:05:06 1021
转载 Cocos2d-X游戏工具开发之一:将Cocos2d-X嵌入MFC的子窗体方法讲解
[Cocos2d-x相关教程来源于红孩儿的游戏编程之路 CSDN博客地址:http://blog.csdn.net/honghaier] 红孩儿Cocos2d-X学习园地QQ群:249941957 加群写:Cocos2d-x另本章为我的Cocos2d-x教程一书初稿。望各位看官多提建议! 本节所用Cocos2d-x版本:cocos2d-1.0.1-x-0
2012-10-13 10:42:55 1609
原创 opengl 画扇形
glColor4f(0.0f, 0.0f, 0.0f, 0.35f); // 设置为Array glDisable(GL_TEXTURE_2D); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_COLOR_ARRAY); GL
2012-10-04 14:29:18 5766
Xcode OpenGL ES模板
2015-12-25
ImageMagick图片批量处理
2013-02-27
Win32 控制台中使用 MFC.zip
2012-06-02
在控制台中使用MFC.zip
2012-06-02
iphone加速器_demo_倾斜
2012-04-11
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人