When I use this code to create a sha256 of a string
unsigned char hashedChars[32]; NSString *inputString; inputString = [NSString stringWithFormat:@\"hello\"
It's important to know that you need to import:
#import
Hope this help!