You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When specifying a key in pem format, an error occurs. Namely, in the VAPID class, in the validate method.
The following point is confusing:
// Line: 57$vapid['privateKey'] = base64_encode(str_pad(Base64Url::decode($jwk->get('d')), 2 * self::PRIVATE_KEY_LENGTH, '0', STR_PAD_LEFT));
// Line: 76if (Utils::safeStrlen($privateKey) !== self::PRIVATE_KEY_LENGTH) {
thrownew \ErrorException('[VAPID] Private key should be 32 bytes long when decoded.');
}
That is, first the length of the key is doubled, adding 0 to the left. And then it is compared with the normal length.
Is this a mistake? Or not? Can someone explain it to me, if it's not too much trouble.
The text was updated successfully, but these errors were encountered:
When specifying a key in pem format, an error occurs. Namely, in the VAPID class, in the validate method.
The following point is confusing:
That is, first the length of the key is doubled, adding 0 to the left. And then it is compared with the normal length.
Is this a mistake? Or not? Can someone explain it to me, if it's not too much trouble.
The text was updated successfully, but these errors were encountered: