Objective-C Implicit conversion loses integer precision (size_t to CC_Long)

后端 未结 3 603
野趣味
野趣味 2021-02-12 08:11

I have a function that\'s generating a sha256 encryption of a string,

Here\'s the function:

    -(NSString*)sha256HashFor:(NSString*)input
{
    const ch         


        
3条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-12 08:44

    1. Presumably that's not an error but a warning.

    2. "I just need to convert the strlen(str) to a CC_Long, but I have no idea how to do that." - explicit type conversion (type casting): (CC_LONG)strlen(str), but I don't think you really need this.

提交回复
热议问题