Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

            @staticmethod
    def by_name(name):
        if name == "P-256":
            return NISTEllipticCurve(256)
        if name == "P-384":
            return NISTEllipticCurve(384)
        if name == "P-521":
            return NISTEllipticCurve(521)
        else:
            raise Exception("Unknown curve {}".format(name))
        


src/p/y/pyjwkest-0.3.0/src/jwkest/jwk.py   pyjwkest(Download)
            raise DeSerializationNotPossible()
 
        self.curve = NISTEllipticCurve.by_name(self.crv)
        if self.d:
            self.d = base64_to_long(self.d)

src/p/y/pyjwkest-0.3.0/src/jwkest/jwe.py   pyjwkest(Download)
            apv = b64d(Random.get_random_bytes(16))
        # Generate an ephemeral key pair
        curve = NISTEllipticCurve.by_name(key.crv)
        if "epk" in kwargs:
            epk = ECKey(key=kwargs["epk"], private=False)