函数'sqlite3_key'的隐式声明?

时间:2022-07-28 18:24:38

I am working on SQLite File Encryption. I have added sqlCipher & crypto frameworks successfully in my project.

我正在研究SQLite文件加密。我在我的项目中成功添加了sqlCipher和crypto框架。

Now when I try to compile my application on this line

现在,当我尝试在这一行编译我的应用程序时

int rc = sqlite3_key(database, [key UTF8String], strlen([key UTF8String]));

it says Implicit declaration of function 'sqlite3_key'

它说函数'sqlite3_key'的隐式声明

So above line "implicit declaration" sounds to me like function is defined but not declared. But where I have to declared ?

所以上面的行“隐式声明”对我来说听起来像函数已定义但未声明。但我必须在哪里宣布?

While searching over Internet, under this article, it says like SQLite Encryption Extension(SEE) is not available publically. I have to purchase it of cost around $2000.

在通过Internet进行搜索时,在本文中,它表示像SQLite加密扩展(SEE)一样不公开。我必须以2000美元左右的价格购买它。

SEE -> http://www.hwaci.com/sw/sqlite/see.html

参见 - > http://www.hwaci.com/sw/sqlite/see.html

So this is the only reason I am getting Implicit declaration & False response while sqlite encryption process ?

所以这是我在sqlite加密过程中获得隐式声明和错误响应的唯一原因?

2 个解决方案

#1


6  

Yes, that is the reason you are getting that compiler warning. The function sqlite3_key() is not defined in the version of libsqlite3 included with iOS. Adding in a function declaration isn't going to help-- it would fix that compiler warning, but it would just mean you'll get a linker error since the function isn't defined anywhere.

是的,这就是你得到编译器警告的原因。函数sqlite3_key()未在iOS附带的libsqlite3版本中定义。添加函数声明不会有帮助 - 它会修复编译器警告,但这只是意味着你会得到链接器错误,因为函数没有在任何地方定义。

If you purchased SEE you could probably build your own copy of SQLite, embed it in your app, and just not use the system's libsqlite3. That this would mean you'd have to say "yes" when the app store submission process asks if your app includes encryption, meaning extra paperwork and time before you could submit the app. I'm not certain whether there's any clear indication of whether Apple would accept it even then-- probably they would, but they've been known to surprise people.

如果您购买了SEE,您可以构建自己的SQLite副本,将其嵌入到您的应用程序中,而不是使用系统的libsqlite3。这意味着当应用商店提交过程询问您的应用是否包含加密时,您必须说“是”,这意味着在您提交应用之前需要额外的文书工作和时间。我不确定是否有任何明确的迹象表明苹果是否会接受它 - 可能他们会这样做,但他们已经知道让人们大吃一惊。

#2


20  

If you are using SQLCipher, you need to define SQLITE_HAS_CODEC in your application's C Flags. Thats all.

如果您使用的是SQLCipher,则需要在应用程序的C标志中定义SQLITE_HAS_CODEC。就这样。

#1


6  

Yes, that is the reason you are getting that compiler warning. The function sqlite3_key() is not defined in the version of libsqlite3 included with iOS. Adding in a function declaration isn't going to help-- it would fix that compiler warning, but it would just mean you'll get a linker error since the function isn't defined anywhere.

是的,这就是你得到编译器警告的原因。函数sqlite3_key()未在iOS附带的libsqlite3版本中定义。添加函数声明不会有帮助 - 它会修复编译器警告,但这只是意味着你会得到链接器错误,因为函数没有在任何地方定义。

If you purchased SEE you could probably build your own copy of SQLite, embed it in your app, and just not use the system's libsqlite3. That this would mean you'd have to say "yes" when the app store submission process asks if your app includes encryption, meaning extra paperwork and time before you could submit the app. I'm not certain whether there's any clear indication of whether Apple would accept it even then-- probably they would, but they've been known to surprise people.

如果您购买了SEE,您可以构建自己的SQLite副本,将其嵌入到您的应用程序中,而不是使用系统的libsqlite3。这意味着当应用商店提交过程询问您的应用是否包含加密时,您必须说“是”,这意味着在您提交应用之前需要额外的文书工作和时间。我不确定是否有任何明确的迹象表明苹果是否会接受它 - 可能他们会这样做,但他们已经知道让人们大吃一惊。

#2


20  

If you are using SQLCipher, you need to define SQLITE_HAS_CODEC in your application's C Flags. Thats all.

如果您使用的是SQLCipher,则需要在应用程序的C标志中定义SQLITE_HAS_CODEC。就这样。