projects
/
gruntmaster-data.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
54bc1df
)
Make the make_reset_hmac function actually useful
author
Marius Gavrilescu
<marius@ieval.ro>
Mon, 16 Feb 2015 15:20:57 +0000
(17:20 +0200)
committer
Marius Gavrilescu
<marius@ieval.ro>
Mon, 16 Feb 2015 15:20:57 +0000
(17:20 +0200)
lib/Gruntmaster/Data/Result/User.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Gruntmaster/Data/Result/User.pm
b/lib/Gruntmaster/Data/Result/User.pm
index 35c6675519435f103ac047c76d968978238b9eec..5c8fe856712095fffeaca0303d31a782892e0017 100644
(file)
--- a/
lib/Gruntmaster/Data/Result/User.pm
+++ b/
lib/Gruntmaster/Data/Result/User.pm
@@
-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.011163 seconds
and
4
git commands to generate.