Exemple #1
0
    def runClientEval(self):
        """
        Runs the client-side eval() and returns the resulting values
        after they've been unwrapped.
        """
        # Query the eval function
        response = self.client.get(self.standardUrl)
        d = self.parse(response)

        # Unwrap the results.
        return (vprf.unwrapY(d["y"]), vprf.unwrapP(d["p"]), 
                vprf.unwrapC(d["c"]), vprf.unwrapU(d["u"]) )
Exemple #2
0
    def testEvalSimple(self):
        """
        Simple test of the eval function
        """
        # Query the eval function
        response = self.client.get(self.standardUrl)
        d = self.parse(response)

        # Verify that we got a response of the correct type
        self.assertTrue( "y" in d )
        y = vprf.unwrapY(d["y"])
        self.assertTrue(isinstance(y, G1Element))