Esempio n. 1
0
    public void ExponentiateX(long pow, byte[] output)
    {
        uint[] x   = GcmUtilities.OneAsUints();
        int    num = 0;

        while (pow > 0)
        {
            if ((pow & 1) != 0)
            {
                EnsureAvailable(num);
                GcmUtilities.Multiply(x, (uint[])lookupPowX2[num]);
            }
            num++;
            pow >>= 1;
        }
        GcmUtilities.AsBytes(x, output);
    }
 public void ExponentiateX(long pow, byte[] output)
 {
     uint[] array = GcmUtilities.OneAsUints();
     if (pow > 0)
     {
         uint[] y = Arrays.Clone(x);
         do
         {
             if ((pow & 1) != 0)
             {
                 GcmUtilities.Multiply(array, y);
             }
             GcmUtilities.Multiply(y, y);
             pow >>= 1;
         }while (pow > 0);
     }
     GcmUtilities.AsBytes(array, output);
 }