Skip to content

Commit 9c9623b

Browse files
Fix private VAPID key padding (#414)
1 parent bce586a commit 9c9623b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/VAPID.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public static function validate(array $vapid): array
5454
throw new \ErrorException('Failed to convert VAPID public key from hexadecimal to binary');
5555
}
5656
$vapid['publicKey'] = base64_encode($binaryPublicKey);
57-
$vapid['privateKey'] = base64_encode(str_pad(Base64Url::decode($jwk->get('d')), 2 * self::PRIVATE_KEY_LENGTH, '0', STR_PAD_LEFT));
57+
$vapid['privateKey'] = base64_encode(str_pad(Base64Url::decode($jwk->get('d')), self::PRIVATE_KEY_LENGTH, '0', STR_PAD_LEFT));
5858
}
5959

6060
if (!isset($vapid['publicKey'])) {

0 commit comments

Comments
 (0)