File: 03-use-Digest-SHA.dpatch

package info (click to toggle)
libmasonx-request-withapachesession-perl 0.30-3.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 116 kB
  • ctags: 14
  • sloc: perl: 592; makefile: 106; sh: 62
file content (28 lines) | stat: -rw-r--r-- 1,388 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#! /bin/sh /usr/share/dpatch/dpatch-run
## 03-use-Digest-SHA.dpatch by Salvatore Bonaccorso <carnil@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Use Digest::SHA instead of Digest::SHA1.

@DPATCH@
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' libmasonx-request-withapachesession-perl~/lib/MasonX/Request/WithMultiSession.pm libmasonx-request-withapachesession-perl/lib/MasonX/Request/WithMultiSession.pm
--- libmasonx-request-withapachesession-perl~/lib/MasonX/Request/WithMultiSession.pm	2012-11-28 16:03:44.000000000 +0100
+++ libmasonx-request-withapachesession-perl/lib/MasonX/Request/WithMultiSession.pm	2012-11-28 16:09:35.108569438 +0100
@@ -2,7 +2,7 @@
 
 use strict;
 
-use Digest::SHA1 ();
+use Digest::SHA ();
 use Time::HiRes;
 
 use base qw(MasonX::Request::WithApacheSession);
@@ -114,7 +114,7 @@
         # using Time::HiRes means that we get times with very high
         # floating point resolutions (to 10 or 11 decimal places), so
         # this is a good seed for a hashing algorithm
-        $new_id = Digest::SHA1::sha1_hex( time() . {} . rand() . $$ );
+        $new_id = Digest::SHA::sha1_hex( time() . {} . rand() . $$ );
     } while ( exists $session->{sub_session_ids}{$new_id} );
 
     $session->{sub_sessions}{$new_id} = {};