Exemple #1
0
    def testEvalSimple(self):
        """
        Simple test of the eval function
        """
        r,x = vpop.blind(pw)
        x = vpop.wrap(x)

        response = self.client.get(VpopEvalTest.urlTemplate.format(w,t,x))
        d = self.check(response)

        y = vpop.unwrapGt(str(d["y"]))
        z = vpop.deblind(r,y)
Exemple #2
0
    def runClientEval(self,w,t,m):
        """
        Runs the client-side eval() and returns the resulting y and z values.
        """
        # Prepare the message
        r,x = vpop.blind(m)
        x = vpop.wrap(x)

        # Submit the request and do a quick-check on the response
        response = self.client.get(VpopEvalTest.urlTemplate.format(w,t,x))
        d = self.check(response)

        # Compute the final result
        y = vpop.unwrapGt(str(d["y"]))
        z = vpop.deblind(r,y)

        return y,z