php openssl使用aes256加密数据并使用sha256散列传递帮助!
openssl only accepting half of a sha256 hashed password$encryptedkey = openssl_encrypt ($data, 'AES256', "$sha256", $raw_output = false);
hash looks like this:a0461cea77b9942addee32b2265b32ebcf150426e2490810938ab47206fd320b
its only accepting 32 characters of it:a0461cea77b9942addee32b2265b32eb
how can i fix this? thank you!
edit: example: when decrypting the data if the hash does not mach after 32 character it will still decrypt it even if its wrong
a0461cea77b9942addee32b2265b32ebcf150426e2490810938ab47206fd320b
a0461cea77b9942addee32b2265b32ebcf150426e24808019485b43406df3a9b
both will work when they shouldn't?
dongwei7245
2010/07/29 17:22- openssl
- php
- 点赞
- 收藏
- 回答
满意答案
1个回复
