Skip to content

Commit

Permalink
fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 26, 2013
1 parent d7e1fee commit 28a76b6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/Mojo/Util.pm
Expand Up @@ -323,7 +323,6 @@ sub xml_escape {
return $string;
}


sub xor_encode {
my ($input, $key) = @_;

Expand Down Expand Up @@ -371,12 +370,9 @@ sub _encoding {

sub _hmac {
my ($hash, $string, $secret) = @_;

# Secret
$secret = $secret ? "$secret" : 'Very insecure!';
$secret = $hash->($secret) if length $secret > 64;

# HMAC
my $ipad = $secret ^ (chr(0x36) x 64);
my $opad = $secret ^ (chr(0x5c) x 64);
return unpack 'H*', $hash->($opad . $hash->($ipad . $string));
Expand Down

0 comments on commit 28a76b6

Please sign in to comment.