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 6474875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:38:20+00:00 2026-05-25T06:38:20+00:00

In my application, I am reading RSS feeds and saving them to a Core

  • 0

In my application, I am reading RSS feeds and saving them to a Core Data db using the URL of each specific article as the key. Passing these URLs around the system can be problematic because they can be lengthy, and I’d like a way to generate a unique identifier to store in the db and just pass that around.

I’d also like it to be reconstructable using the same string so that if I get a duplicate URL, I can generate the identifier from it and simply check Core Data for the identifier.

Is there an easy way to do this?

  • 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-25T06:38:20+00:00Added an answer on May 25, 2026 at 6:38 am

    When most people are talking about hashes, they are generally thinking about one-way hashes like SHA1, SHA2, or MD5. While these are imminently useful, they will not allow you to take a hash and reverse it into its original form. They will, however, allow you to do things like compare a user entered password with one they’ve entered before without ever having to store the actual password — only the hash.

    What you seem to want is string compression or deflation. Luckily, gzip is supported out of the box using the ASIHTTPRequest class. Here’s some code for using gzip found in this discussion.

    NSString *encodedGzippedString = @"GgAAAB+LCAAAAAAABADtvQdgHEmWJSYvbcp7f0r1StfgdKEIgGATJNiQQBDswYjN5pLsHWlHIymrKoHKZVZlXWYWQMztnbz33nvvvffee++997o7nU4n99//P1xmZAFs9s5K2smeIYCqyB8/fnwfPyK+uE6X2SJPiyZ93eaX+TI9Lcuiatvx/wOwYc0HGgAAAA==";
    NSData *decodedGzippedData = [NSData dataFromBase64String:encodedGzippedString];
    NSData* unGzippedJsonData = [ASIHTTPRequest uncompressZippedData:decodedGzippedData];   
    NSString* unGzippedJsonString = [[NSString alloc] initWithData:unGzippedJsonData encoding:NSASCIIStringEncoding];       
    NSLog(@"Result: %@", unGzippedJsonString);  
    

    There is a very good article that discusses hashing using MD5 here:
    http://cocoawithlove.com/2009/07/hashvalue-object-for-holding-md5-and.html

    Using the CommonCrypto library, there are a number of hash algorithms already built in. You can use the MD5 hasing algorithm like this:

    #import <CommonCrypto/CommonDigest.h>
    
    char input[] = "Some data value.";
    char result[16];
    CC_MD5(input, strlen(input), result);
    

    This will print out the hash in human-readable hex form:

    printf("MD5 (\"%s\") = %02x%02x%02x%02x%02x%02x
                           %02x%02x%02x%02x%02x%02x
                           %02x%02x%02x%02x\n",
        input,
        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]);
    

    If you would like more information on forward-only hashing, I posted some info as well as production-ready code in this SO answer.

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

Sidebar

Related Questions

I'm reading this Application Server Specific Configuration Guide, http://axis.apache.org/axis2/java/core/docs/app_server.html , for Axis2. What does
My application is SL2 reading and writing data through an Entity Framework Model exposed
Having a project with following requirements in mind. data reading intensive application. 100 max
I have an application where I am reading and writing small blocks of data
I have an application build in C# for reading and saving SMS and MMS,
i implemented a small web application to create Rss feeds in java(spring mvc) i
In my Android application for reading RSS links, I am getting this error: java.net.UnknownHostException:
So looking into using memcache in my web application I am reading up about
I have a requirement to consume only the latest two rss feeds (using .NET)
I am building an application reading the signal strength of each available Wifi access

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.