Subject: | Crypt::RSA::DataFormat::i2osp broke if 2 msbyte is 0x0100 |
if the two most significant byte is 0x0100 then chr(0x0100) is prepended to the string. Fix is simple one liner; see patch
## $Id: DataFormat.pm,v 1.13 2001/05/20 23:37:45 vipul Exp $
Thanks
***************
*** 34,40 ****
my $r = $d % $base;
$d = ($d-$r) / $base;
$result = chr($r) . $result;
! } until ($d <= $base);
$result = chr($d) . $result if $d != 0;
if (length($result) < $l) {
--- 34,40 ----
my $r = $d % $base;
$d = ($d-$r) / $base;
$result = chr($r) . $result;
! } until ($d < $base);
$result = chr($d) . $result if $d != 0;
if (length($result) < $l) {