IMPORTANT!

Snipt is going open source. We've toyed with this idea for quite a while, and have finally decided it's the right way to move forward.

A few things:
  • The entire Snipt source code will be released on GitHub under the 3-clause BSD License on Friday, September 10th.
  • While we'd like to think we're perfect, we realize we're only human. By open sourcing the software that runs this website, certain bugs or security flaws may be discovered that could compromise the privacy of your snipts.
  • Only the Lion Burger team will be able to push commits to the Snipt.net site. Contributors should send a pull request to add new features or submit patches.
  • By using this site, you agree not to be too angry or take any legal action against Lion Burger should this whole thing go up in flames some day.
  • Follow us on Twitter for updates.
I agree, close this message
Sign up to create your own snipts, or login.

Latest 100 public snipts » md5 The latest public md5 snipts.

showing 1-4 of 4 snipts for md5
  • create and print SHA1 and MD5 hashes of passwords
    Perl code to create and print SHA1 and MD5 hashes of passwords
    
    #!/usr/bin/perl -I /usr/lib/perl5/site_perl/5.005/i386-linux
    
    # Perl code to create and print SHA1 and MD5 hashes of passwords
    # shamelessly stolen from the openLDAP Faq-O-Matic
    # written 19-Jul-01 by Ed Truitt
    # Updated 12-Oct-01 to include a {crypt} version of the password
    
    $theGoodWord = $ARGV[0];
    chomp($theGoodWord);
    
    # First, print the clear text version
    
    print "\n" ;
    print "The Good Word is ==> $theGoodWord \n " ;
    print "\n" ;
    
    # Now generate and print the SHA1 hash
    
    use Digest::SHA1;
    use MIME::Base64;
    $ctx = Digest::SHA1->new;
    $ctx->add($theGoodWord);
    $hashedSHAPasswd = '{SHA}' . encode_base64($ctx->digest,'');
    print 'userPassword: ' . $hashedSHAPasswd . "\n";
    
    
    # Now generate and print the MD5 hash
    
    use Digest::MD5;
    use MIME::Base64;
    $ctx = Digest::MD5->new;
    $ctx->add($theGoodWord);
    $hashedMD5Passwd = '{MD5}' . encode_base64($ctx->digest,'');
    print 'userPassword: ' . $hashedMD5Passwd . "\n";
    
    
    # Now generate and print the CRYPT version
    
    # first we need to generate the salt
    
    @chars = ("A" .. "Z", "a" .. "z", 0 .. 9, qw(. /) );
    $salt = join("", @chars[ map { rand @chars} ( 1 .. 4) ]);
    
    # now to generate the password itself
    
    $cryptPasswd = '{crypt}' . crypt($theGoodWord,$salt);
    print 'userPassword: ' . $cryptPasswd . "\n";
    print "\n";
    

    copy | embed

    0 comments - tagged in  posted by rschu68 on Apr 12, 2010 at 5:47 a.m. EDT
  • random md5
    md5(uniqid(rand(), true));
    

    copy | embed

    0 comments - tagged in  posted by nicolascormier on Feb 08, 2010 at 7:49 p.m. EST
  • Encrypt a password with a two-level md5 application and some letter swapping. It has no decrypter
    <?php
    function encriptar($contrasena)
    {
    	$max = strlen($contrasena);
    	$numero = floor(sqrt($max*2));
    	for($i=0;$i<$numero;$i++)
    	{
    		$temp = $contrasena[$i];
    		$contrasena[$i] = $contrasena[$max - $i - 1];
    		$contrasena[$max - $i - 1] = $temp;
    	}
    	$niveluno = md5($contrasena);
    	
    	$max2 = strlen($niveluno);
    	if($numero>($max2-1))
    	{
    		$numero = $max/2 - 1;
    	}
    	for($i=0;$i<$numero;$i++)
    	{
    		$temp = $niveluno[$i];
    		$niveluno[$i] = $niveluno[$max2 - $i - 1];
    		$niveluno[$max2 - $i - 1] = $temp;
    	}
    	$niveldos = md5($niveluno);
    	return $niveldos;
    }
    ?>
    

    copy | embed

    0 comments - tagged in  posted by kor on Dec 02, 2009 at 7:46 p.m. EST
  • MD5 MySQL
    insert into usuarios(usuario,nombres,apellidos,passwd) values('bond','James','Bond',md5('administrador'));
    

    copy | embed

    0 comments - tagged in  posted by ezhgnu on Apr 08, 2009 at 3:06 p.m. EDT
Sign up to create your own snipts, or login.