r53429 - in /branches/upstream/libcrypt-saltedhash-perl/current: Changes META.yml Makefile.PL README lib/Crypt/SaltedHash.pm

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sun Feb 28 20:24:09 UTC 2010


Author: jawnsy-guest
Date: Sun Feb 28 20:23:59 2010
New Revision: 53429

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=53429
Log:
[svn-upgrade] Integrating new upstream version, libcrypt-saltedhash-perl (0.06)

Modified:
    branches/upstream/libcrypt-saltedhash-perl/current/Changes
    branches/upstream/libcrypt-saltedhash-perl/current/META.yml
    branches/upstream/libcrypt-saltedhash-perl/current/Makefile.PL
    branches/upstream/libcrypt-saltedhash-perl/current/README
    branches/upstream/libcrypt-saltedhash-perl/current/lib/Crypt/SaltedHash.pm

Modified: branches/upstream/libcrypt-saltedhash-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcrypt-saltedhash-perl/current/Changes?rev=53429&op=diff
==============================================================================
--- branches/upstream/libcrypt-saltedhash-perl/current/Changes (original)
+++ branches/upstream/libcrypt-saltedhash-perl/current/Changes Sun Feb 28 20:23:59 2010
@@ -1,6 +1,10 @@
 Revision history for Perl extension Crypt::SaltedHash.
 
-0.05  Thu Aug 10 03:04>33 2006
+0.06  Sun Feb 28 01:55:22 2010
+    - added clear method
+	- add returns now $self
+
+0.05  Thu Aug 10 03:04:33 2006
     - switched to Module::Build
 
 0.04  Thu Jan 26 04:56:56 2006

Modified: branches/upstream/libcrypt-saltedhash-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcrypt-saltedhash-perl/current/META.yml?rev=53429&op=diff
==============================================================================
--- branches/upstream/libcrypt-saltedhash-perl/current/META.yml (original)
+++ branches/upstream/libcrypt-saltedhash-perl/current/META.yml Sun Feb 28 20:23:59 2010
@@ -1,6 +1,6 @@
 ---
 name: Crypt-SaltedHash
-version: 0.05
+version: 0.06
 author:
   - 'Sascha Kiefer, L<esskar at cpan.org>'
 abstract: |-
@@ -14,8 +14,8 @@
 provides:
   Crypt::SaltedHash:
     file: lib/Crypt/SaltedHash.pm
-    version: 0.05
-generated_by: Module::Build version 0.2801
+    version: 0.06
+generated_by: Module::Build version 0.280801
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.2.html
   version: 1.2

Modified: branches/upstream/libcrypt-saltedhash-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcrypt-saltedhash-perl/current/Makefile.PL?rev=53429&op=diff
==============================================================================
--- branches/upstream/libcrypt-saltedhash-perl/current/Makefile.PL (original)
+++ branches/upstream/libcrypt-saltedhash-perl/current/Makefile.PL Sun Feb 28 20:23:59 2010
@@ -1,14 +1,14 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.03
+# Note: this file was auto-generated by Module::Build::Compat version 0.2808_01
 use ExtUtils::MakeMaker;
 WriteMakefile
 (
-          'PL_FILES' => {},
-          'INSTALLDIRS' => 'site',
           'NAME' => 'Crypt::SaltedHash',
-          'EXE_FILES' => [],
           'VERSION_FROM' => 'lib/Crypt/SaltedHash.pm',
           'PREREQ_PM' => {
                            'Digest' => '0'
-                         }
+                         },
+          'INSTALLDIRS' => 'site',
+          'EXE_FILES' => [],
+          'PL_FILES' => {}
         )
 ;

Modified: branches/upstream/libcrypt-saltedhash-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcrypt-saltedhash-perl/current/README?rev=53429&op=diff
==============================================================================
--- branches/upstream/libcrypt-saltedhash-perl/current/README (original)
+++ branches/upstream/libcrypt-saltedhash-perl/current/README Sun Feb 28 20:23:59 2010
@@ -171,6 +171,9 @@
         Logically joins the arguments into a single string, and uses it to
         update the current digest state. For more details see Digest.
 
+    clear()
+        Resets the digest.
+
     salt_bin()
         Returns the salt in binary form.
 
@@ -206,7 +209,7 @@
     (<http://www.securitydocs.com/library/3439>)
 
 COPYRIGHT AND LICENSE
-    Copyright (C) 2005 Sascha Kiefer
+    Copyright (C) 2010 Sascha Kiefer
 
     This library is free software; you can redistribute it and/or modify it
     under the same terms as Perl itself.

Modified: branches/upstream/libcrypt-saltedhash-perl/current/lib/Crypt/SaltedHash.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcrypt-saltedhash-perl/current/lib/Crypt/SaltedHash.pm?rev=53429&op=diff
==============================================================================
--- branches/upstream/libcrypt-saltedhash-perl/current/lib/Crypt/SaltedHash.pm (original)
+++ branches/upstream/libcrypt-saltedhash-perl/current/lib/Crypt/SaltedHash.pm Sun Feb 28 20:23:59 2010
@@ -6,7 +6,7 @@
 
 use vars qw($VERSION);
 
-$VERSION = '0.05';
+$VERSION = '0.06';
 
 =head1 NAME
 
@@ -211,6 +211,19 @@
 sub add {
     my $self = shift;
     $self->obj->add(@_);
+    return $self;
+}
+
+=item B<clear()>
+
+Resets the digest.
+
+=cut
+
+sub clear {
+    my $self = shift;
+    $self->{digest} = Digest->new( $self->{algorithm} );
+    return $self;
 }
 
 =item B<salt_bin()>
@@ -220,7 +233,7 @@
 =cut
 
 sub salt_bin {
-    my ($self) = @_;
+    my $self = shift;
 
     return $self->{salt} =~ m!^HEX{(.*)}$!i ? pack( "H*", $1 ) : $self->{salt};
 }
@@ -232,7 +245,7 @@
 =cut
 
 sub salt_hex {
-    my ($self) = @_;
+    my $self = shift;
 
     return $self->{salt} =~ m!^HEX{(.*)}$!i
       ? $self->{salt}
@@ -248,14 +261,14 @@
 =cut
 
 sub generate {
-    my ($self) = @_;
+    my $self = shift;
 
     my $clone = $self->obj->clone;
     my $salt  = $self->salt_bin;
 
     $clone->add($salt);
 
-    my $gen    = &MIME::Base64::encode_base64( $clone->digest . $salt, '' );
+    my $gen = &MIME::Base64::encode_base64( $clone->digest . $salt, '' );
     my $scheme = $self->{scheme};
 
     return "{$scheme}$gen";
@@ -300,7 +313,7 @@
 =cut
 
 sub obj {
-    shift->{digest};
+    return shift->{digest};
 }
 
 =back
@@ -329,6 +342,7 @@
 
     if ( $algorithm =~ m!^S(.*)$! ) {
         $algorithm = $1;
+
         # print STDERR "algorithm: $algorithm\n";
         if ( $algorithm =~ m!([a-zA-Z]+)([0-9]+)! ) {
 
@@ -402,7 +416,7 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (C) 2005 Sascha Kiefer
+Copyright (C) 2010 Sascha Kiefer
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself.




More information about the Pkg-perl-cvs-commits mailing list