문제

What are the possible characters for $code:

$randStr = "some random string that contains only: [a-zA-Z0-9_]";
$code = hash('sha512', $randStr);
도움이 되었습니까?

해결책

SHA512 will generate 128 characters of lowercase HEX characters (0 to f), e.g.

a9046c73e00331af68917d3804f70655a9046c73e00331af68917d3804f70655a9046c73e00331af68917d3804f70655

See the documentation for hash() for more information.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top