Home  >  Q&A  >  body text

How does php implement java's sha1 encryption?

How does php implement java's sha1 encryption?

张启华张启华2517 days ago1245

reply all(2)I'll reply

  • *Olin。

    *Olin。2018-01-04 10:06:50

    <?php
    $str = "Shanghai";
    echo "String: ".$str."<br>";
    echo "TRUE - Raw 20-character binary format: ".sha1($str, TRUE)."<br>";
    echo "FALSE - 40 character hexadecimal number: ".sha1($str)."<br>";
    ?>

    reply
    0
  • 我

    If you want to learn Java and python, you can scan the QR code to get the course. Ours is a public account owned by Silicon Valley. We have free practical project learning and source code as well as Java-related materials. Follow our official account and you can get it for free.

    · 2020-07-18 20:57:31
  • Cancelreply