You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I would propose to introduce generic validator for different types of hashes. Right now, we have isMD5() validator, which is great, but there are no validators for other hash types, like sha256.
I would suggest the following API:isHash(str, algorithm).
We could call it like this: isHash('6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b', 'sha256').
Hello!
Thank you for this great library!
However, I would propose to introduce generic validator for different types of hashes. Right now, we have
isMD5()
validator, which is great, but there are no validators for other hash types, likesha256
.I would suggest the following API:
isHash(str, algorithm)
.We could call it like this:
isHash('6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b', 'sha256')
.Here's the list of most popular hash functions (algorithms): http://stackoverflow.com/q/16393650/1056679.
The original
isMD5()
could be deprecated over time in favor ofisHash(str, 'md5')
.What do you think?
Thanks!
The text was updated successfully, but these errors were encountered: