mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-13 00:46:31 +00:00
fix IEEE length calculations
secp521r1 has length of 521 so we want 66 to cover that last extra bit - not 65
This commit is contained in:
parent
2276cf51c0
commit
45b98d8cb3
@ -62,7 +62,7 @@ abstract class IEEE
|
||||
{
|
||||
$r = $r->toBytes();
|
||||
$s = $s->toBytes();
|
||||
$length >>= 3;
|
||||
$length = (int) ceil($length / 8);
|
||||
return str_pad($r, $length, "\0", STR_PAD_LEFT) . str_pad($s, $length, "\0", STR_PAD_LEFT);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user