Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for natBytes (0.77 sec)

  1. src/crypto/internal/bigmod/nat_test.go

    		t.Error(err)
    	}
    }
    
    func TestMontgomeryRoundtrip(t *testing.T) {
    	err := quick.Check(func(a *Nat) bool {
    		one := &Nat{make([]uint, len(a.limbs))}
    		one.limbs[0] = 1
    		aPlusOne := new(big.Int).SetBytes(natBytes(a))
    		aPlusOne.Add(aPlusOne, big.NewInt(1))
    		m, _ := NewModulusFromBig(aPlusOne)
    		monty := new(Nat).set(a)
    		monty.montgomeryRepresentation(m)
    		aAgain := new(Nat).set(monty)
    		aAgain.montgomeryMul(monty, one, m)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 12 00:56:20 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  2. src/testing/benchmark.go

    	// The initial states of memStats.Mallocs and memStats.TotalAlloc.
    	startAllocs uint64
    	startBytes  uint64
    	// The net total of this test after being run.
    	netAllocs uint64
    	netBytes  uint64
    	// Extra metrics collected by ReportMetric.
    	extra map[string]float64
    }
    
    // StartTimer starts timing a test. This function is called automatically
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  3. src/encoding/asn1/asn1.go

    		return nil, err
    	}
    	ret := new(big.Int)
    	if len(bytes) > 0 && bytes[0]&0x80 == 0x80 {
    		// This is a negative number.
    		notBytes := make([]byte, len(bytes))
    		for i := range notBytes {
    			notBytes[i] = ^bytes[i]
    		}
    		ret.SetBytes(notBytes)
    		ret.Add(ret, bigOne)
    		ret.Neg(ret)
    		return ret, nil
    	}
    	ret.SetBytes(bytes)
    	return ret, nil
    }
    
    // BIT STRING
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 31.8K bytes
    - Viewed (0)
Back to top