Jump to content

Search the Community

Showing results for tags 'md5'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 2 results

  1. This will work for any java program, you can use the following code to create a hash using any of the following cryptographic hash functions: MD2 MD5 Sha1 Sha-256 Sha-384 Sha-512 [code] import java.security.*; public static String createHash(String s) { try { MessageDigest md = MessageDigest.getInstance("Sha-512");//Change this to whatever Hash function you want to byte[] array = md.digest(s.getBytes()); StringBuffer sb = new StringBuffer(); for (int i = 0; i < array.length; i++) { sb.append(Integer.toHexString((array[i] & 0xFF) | 0x100).substring(1,3)); } return sb.toString(); } catch (NoSuchAlgorithmException e) { } return null; } [/code] There you go, secure hash for any string you want. Personally I use it to create a hash for the data I store on my MySQL Database, but there's multiple uses.
  2. Hey Runelocus Members, In this tutorial, I will teach you how to successfully secure your password using the MD5() without it being de-crypted (Depends on Password). Though there are much better ways like sanitizing, using salt, SHA-256 and so on, but because this isn't really a PHP forum, I wont go in depth. However, this is a very much good way of securing your password. [B]Requirements: [/B] 1- Web-host with PHP installed. (Latest version would be nice) 2- Perhaps a small understanding of PHP, more or less, copy and paste. Alright, if you meet the requirements, then please open your file manager in your web-host CPanel. Create a new directory called [b]md5[/b] or you can use your current directory or create another directory of your choice. Anyway, create a new file called [B]md5.php[/B]. Open it and add the following code. [php] <? $password = $_POST['password']; if(isset($_POST['submit'])) { $newpass = md5($password); echo 'Your encrypted password is now: ' . $newpass; } ?> <html> <form method="POST"> <input type="text" name="password" placeholder="type a password" /> <input type="submit" name="submit" value="MD5 Password!" /> </form> </hmtl> [/php] [B]Code explanation:[/B] To encrypt a password we want, we are going to have to send it to PHP so it can be processed. We can use the [b]$_POST[/b] method. As you can see, on the input field, there is a name called [b]password[/b], and a PHP code $_POST['[b]password[/b]'];. Because of this, the form will be able to communicate with PHP and will be able to process what ever the code provided is below. In this case, it'l be encrypting any text submitted from the form. The [B]isset()[/B] function is used to check whether the variable [b]$_POST['submit'][/b] is set and not null. Else, nothing would happen on the page after clicking submit. The [b]$newpass[/b] variable takes the password sent from the form and encrypts it using the MD5(). As the code shown: [code] $newpass = md5($password); [/code] Md5($password), everything that the $password variable has taken from the form, will be encrypted as it's being wrapped around the MD5(); function. Lastly, echoing the results. As you can see, [code] echo 'Your encrypted password is now: ' . $newpass; [/code] After the encryption has completed, it will then echo your new password! The [b]$newpass[/b] simply gets the MD5 version of your password and prints it onto the page. [B]The Results:[/B] Here is how the form would look like: [img]http://i.imgur.com/HQL3G.png[/img] And now, here is what it would look like after I have encrypted my password: [img]http://img252.imageshack.us/img252/8904/6ce49140d4d14b928965380.png[/img] Now as you can see, my password has turned into a 128-bit 32-character hexadecimal value. And there you have it! Your password has been encrypted. [b]Why can't I just encrypt my password on those free MD5 sites?[/b] The reason is quite obvious, for every encryption you do, they will store in their database. And then, if you wanted to decrypt it, you would find your origional password as they will find a matching hash on their database. Here's proof that they cannot decrypt a MD5 that I've created using the code above: [spoiler=proof] Here a hash that I've just got after encrypting my password on my host: [img]http://i.imgur.com/LCVPn.png[/img] Now, using the hash provided, I will attempt to decrrypt it using the top 3 MD5 decryptor websites using the google search: Result1: - [url]http://www.md5decrypter.co.uk/[/url] [img]http://img41.imageshack.us/img41/7708/afc02d56c33443a6a738a8a.png[/img] Result2: - [url]http://www.md5decrypter.com/[/url] [img]http://i.imgur.com/juGub.png[/img] Restul3: - [url]http://www.md5online.org/[/url] [img]http://i.imgur.com/xoqLV.png[/img] And there you have it. As you can see, even the top 3 MD5 decrypter sites failed to get my password. Obviously, if you're going to use a password like "john" or "123456", then it will be decrypted easily as MD5() does not randomize the password. [/spoiler] I hope my tutorial have given you a brief understanding on how to use MD5(), I couldn't think of a better tutorial, and I really had MD5() in my head. I don't mind what feedback I get, but if I helped you, please thank this thread! I'm also good with Jquery, I could perhaps make a tutorial with Jquery too? Thanks, Nick Magic23.
×