Skip to content

Instantly share code, notes, and snippets.

@poppen
Created January 5, 2011 04:56
Show Gist options
  • Save poppen/765947 to your computer and use it in GitHub Desktop.
Save poppen/765947 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
use Digest::MD5 qw( md5_hex );
use feature qw( say );
my $secret = $ARGV[0];
my @argvs = split('&', $ARGV[1]);
my $params_ref;
for my $argv (@argvs) {
my($key, $val) = split('=', $argv);
$params_ref->{$key} = $val;
}
my $string = $secret;
for my $key (sort keys %{$params_ref}) {
$string .= $key;
$string .= $params_ref->{$key}
}
say md5_hex($string);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment