NSString SHA1 encoding
Glnn opened this issue · 1 comments
Glnn commented
When comparing the SHA1 hash of a NSString with that of a PHP SHA1 hash thing normally work OK!
But it doesn't with emoji characters, because PHP encodes SHA1 in ASCII.
I'd like to propose an additional [NSString SHA1SumUsingEncoding:(NSStringEncoding)]; to fix potential problems with comparing hashes.
Thoughts?
soffes commented
Great idea! Send me a pull request with that implemented and tests, and I'll gladly merge it.