Minishlink\WebPush\VAPID::getUncompressedKeys PHP Method

getUncompressedKeys() private static method

private static getUncompressedKeys ( Mdanter\Ecc\Crypto\Key\PrivateKeyInterface $privateKeyObject )
$privateKeyObject Mdanter\Ecc\Crypto\Key\PrivateKeyInterface
    private static function getUncompressedKeys(PrivateKeyInterface $privateKeyObject)
    {
        $pointSerializer = new UncompressedPointSerializer(EccFactory::getAdapter());
        $vapid['publicKey'] = base64_encode(hex2bin($pointSerializer->serialize($privateKeyObject->getPublicKey()->getPoint())));
        $vapid['privateKey'] = base64_encode(hex2bin(str_pad(gmp_strval($privateKeyObject->getSecret(), 16), 2 * self::PRIVATE_KEY_LENGTH, '0', STR_PAD_LEFT)));
        return $vapid;
    }