Skip to content

Commit

Permalink
Update Compress.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kawax committed Dec 6, 2024
1 parent 7983054 commit fe41148
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Crypto/Format/Compress.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Revolution\Bluesky\Crypto\Format;

use Illuminate\Support\Str;
use phpseclib3\Crypt\EC\BaseCurves\Base as BaseCurve;
use phpseclib3\Math\PrimeField\Integer;

Expand All @@ -20,7 +21,7 @@ public static function savePublicKey(BaseCurve $curve, array $publicKey, array $
// 32
$length = $curve->getLengthInBytes();

$hexString = str_pad($publicKey[0]->toHex(), $length, '0', STR_PAD_LEFT);
$hexString = Str::padLeft($publicKey[0]->toHex(), $length, pad: '0');

return $prefix.$hexString;
}
Expand Down

0 comments on commit fe41148

Please sign in to comment.