]> iEval git - gruntmaster-data.git/commitdiff
Make the make_reset_hmac function actually useful
authorMarius Gavrilescu <marius@ieval.ro>
Mon, 16 Feb 2015 15:20:57 +0000 (17:20 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Mon, 16 Feb 2015 15:20:57 +0000 (17:20 +0200)
lib/Gruntmaster/Data/Result/User.pm

index 35c6675519435f103ac047c76d968978238b9eec..5c8fe856712095fffeaca0303d31a782892e0017 100644 (file)
@@ -269,7 +269,8 @@ sub make_reset_hmac {
        my ($self, $expire) = @_;
        $expire  //= time + 60 * 60;
        $hmackey //= random_bytes 512;
-       hmac_sha1_base64 $self->id . " $expire " . $self->passphrase, $hmackey;
+       my $hmac = hmac_sha1_base64 $self->id . " $expire " . $self->passphrase, $hmackey;
+       wantarray ? ($hmac, $expire) : $hmac
 }
 
 1;
This page took 0.026818 seconds and 4 git commands to generate.