Re: Problems with RC5 (looks simple enough)

[email protected] (Benjamin Trott) Fri, 12 Jul 2002 11:15:14 -0700
Newsgroups perl.crypto
Message-ID <[email protected]>
> Yeah, I tried it on linux, and same problem. I don't think it handles
> newlines right.

This patch fixes the newline bug:

--- RC5.pm.orig      Mon Nov 26 08:05:50 2001
+++ RC5.pm   Fri Jul 12 11:18:31 2002
@@ -65,7 +65,7 @@
          $A = Y( @S, 3 );
          $B = Y( @L, M( $A + $B ) );
      }
-    while ( $text =~ /(.{8})/g ) {
+    while ( $text =~ /(.{8})/gs ) {
          $last = $';
          Process( $1, $decrypt );
      }

bye,
Ben