title: "implicit declaration of function" error in Objective-C
body: <p>i want to convert a short string to md5 hash , I found several post about it but noone worked.
  it's the simplest example that I found . i have this error </p>
  
  <blockquote>
    <p>implicit declaration of function CC_MD5 is invalid in C99</p>
  </blockquote>
  
  <pre><code>- (NSString *) md5:(NSString *) input
  {
   const char *cStr = [input UTF8String];
   unsigned char digest[16];
   CC_MD5( cStr, strlen(cStr), digest ); // This is the md5 call
  
   NSMutableString *output = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH * 2];
  
   for(int i = 0; i &lt; CC_MD5_DIGEST_LENGTH; i++)
   [output appendFormat:@"%02x", digest[i]];
  
   return  output;
   }
  </code></pre>
  
  <p><strong>UPDATE</strong>
  i added #import  , it work fine when i call the method like this :</p>
  
  <pre><code>[self md5:@"admin"];
  </code></pre>
  
  <p>, i get the right md5 hash. But when i do this</p>
  
  <pre><code> [self md5:userId];
  </code></pre>
  
  <p>i get an error , </p>
  
  <blockquote>
    <p>[NSDecimalNumber UTF8String]: unrecognized selector sent to instance
    0x4d3e280
    But userId is not decimal , he contain facebook id , but it's declared as NSString </p>
  </blockquote>
  
  <pre><code>NSString *userId;
  @property(retain,nonatomic) NSString *userId;
  </code></pre>