普通网友
2018-06-11 16:12
浏览 36
已采纳

如何在php中使用password_hash函数散列1000个字符或更多的标记?

I have a token of around 1400 characters, and I want to hash it using the password_hash function but using the PASSWORD_DEFAULT algorithm will only generate the hash using only first 72 characters. I have explored PASSWORD_ARGON2I algorithm, but I am not sure if it is considering the full token length of 1400 characters.

I have tested the following:

php -r echo password_hash(<$embedtokenhere>, PASSWORD_ARGON2I) . "
";

This will give me the result as

$argon2i$v=19$m=1024,t=2,p=2$cUdEZjFHN2lHYzUwR2hqeg$aRzXaa1RAArMl+cwuczG6rng2omZjqJnaImnh4ZvxeM

Is it hashing considering all the characters or does the PASSWORD_ARGON2I has a limit length for the input string to be hashed?

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

2条回答 默认 最新

相关推荐 更多相似问题