Hash methods for NSString and NSData