Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7579135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:36:05+00:00 2026-05-30T17:36:05+00:00

I have a SQLite database which contains confidential information. So my concern is how

  • 0

I have a SQLite database which contains confidential information. So my concern is how do I store it in iPhone so that it is secure and hackers can’t get to it. I looked into hardware encryption provided by ipad but could’t figure it out how to use that.Any Help is appreciated…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T17:36:06+00:00Added an answer on May 30, 2026 at 5:36 pm

    You may look at different approaches for soulution of your problem.

    • Encrypt values, stored in CoreData with md5 + salt encryption. You can generate special key, based on user device UUID and some additional “salt” to store data. Be careful, Apple is going to depreciate device personalization values in future. But on the other side, you may recieve special key by user authentification and recieving this key from post request. For encryption you can use built in framework: #import <CommonCrypto/CommonDigest.h>. There are a lot of examples which you can find on the web.

    • Encrypt whole sqlite file in documents folder. This can me quite tricky, and and have not faced this approach before.

    EDIT:
    This is code sample which you can use to receive encrypted with md5 data:
    This is .h file

    #import <Foundation/Foundation.h>
    
    @interface NSString (MyExtensions)
    - (NSString *) md5;
    @end
    
    @interface NSData (MyExtensions)
    - (NSString *)md5;
    @end
    

    this is .m file:

    #import "MyExtensions.h" //here should be your .h file name
    #import <CommonCrypto/CommonDigest.h> // Need to import for CC_MD5 access
    
    @implementation NSString (MyExtensions)
    - (NSString *) md5
    {
        const char *cStr = [self UTF8String];
        unsigned char result[16];
        CC_MD5( cStr, strlen(cStr), result ); // This is the md5 call
        return [NSString stringWithFormat:
                @"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
                result[0], result[1], result[2], result[3], 
                result[4], result[5], result[6], result[7],
                result[8], result[9], result[10], result[11],
                result[12], result[13], result[14], result[15]
                ];  
    }
    @end
    
    @implementation NSData (MyExtensions)
    - (NSString *)md5
    {
        unsigned char result[16];
        CC_MD5( self.bytes, self.length, result ); // This is the md5 call
        return [NSString stringWithFormat:
                @"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
                result[0], result[1], result[2], result[3], 
                result[4], result[5], result[6], result[7],
                result[8], result[9], result[10], result[11],
                result[12], result[13], result[14], result[15]
                ];  
    }
    @end
    

    So if you include this files to any place of your code, you can simply call this function:

    NSString *myStringToEncrypt = @"Confidential information";
    NSString *myMD5 = [myStringToEncrypt md5];
    

    btw: you should know, that MD5 function is just hash function, which returns you control sum of data. If you want to encrypt, you could look at AES256 encryption method. CommonCrypto also provides it. Approach depends on your goals.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a file name database.sqlite which contains data that I have to use.
I have a SQLite database that contains a huge set of log messages. I
I have a component that i want to store to an SQLite database. public
I have an SQLite database which contains transactions, each of them having a price
I have one problem with Android SQLite database. I have one table which contains
I have a .sqlite db which contains only one table. That table contains three
I have one table in sqlite database which contains five different columns as shown
I have a description column in my SQLite database that contains some text to
I have a DataTable which I want to save to a SQLite Database Table.
I have a datalogging application (c#/.net) that logs data to a SQLite database. This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.