Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Simple STRING TO HASH
- Code by Altenator IWnet
- */
- echo "<center><form method='post'>
- Insert STRING Here : <input type='text' name='hash_input' value='' /><br><br>
- <input type='submit' name='submit_hash' value='Encode' /><br><br>";
- if (isset($_POST['submit_hash'])) {
- if (isset($_POST['hash_input'])) {
- $hash_input = $_POST['hash_input'];
- }
- if ($hash_input=="") { // show error if nothing inserted in input box
- echo 'Nothing Inserted!';
- } else {
- if (isset($hash_input)) {
- foreach (hash_algos() as $hash_setoption) { // set to use all hash function
- $calculate_hash = hash($hash_setoption, $hash_input, false); // calculate all hash and declare variable
- echo "$hash_setoption("<font color='#001EFF'>$hash_input</font>") = "<font color='#5BC740'>$calculate_hash</font>"<br>"; // output
- }
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement