public static function createFromEccKey(PublicKeyInterface $eccKey) : self
    {
        $math = EccFactory::getAdapter();
        $pointSerializer = new UncompressedPointSerializer($math);
        $point = $eccKey->getPoint();
        $hex = $pointSerializer->serialize($point);

        $binary = new BinaryString(hex2bin($hex));

        return new self($binary);
    }
public static function createFromEccKey(PublicKeyInterface $eccKey) : self
    {
        $math = EccFactory::getAdapter();
        $pointSerializer = new UncompressedPointSerializer($math);
        $point = $eccKey->getPoint();
        $hex = $pointSerializer->serialize($point);

        $binary = new BinaryString(hex2bin($hex));

        return new self($binary);
    }
public static function createFromEccKey ( PublicKeyInterface $ eccKey ) : self { $ math = EccFactory :: getAdapter ( ) ; $ pointSerializer = new UncompressedPointSerializer ( $ math ) ; $ point = $ eccKey -> getPoint ( ) ; $ hex = $ pointSerializer -> serialize ( $ point ) ; $ binary = new BinaryString ( hex2bin ( $ hex ) ) ; return new self ( $ binary ) ; }
Create a public key from a Mdanter Ecc Public Key.

@param PublicKeyInterface $eccKey

@throws InvalidArgumentException When the public key is not the correct length.
Create a public key from a Mdanter Ecc Public Key .