- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 74 for newInt (0.1 sec)
-
src/crypto/internal/mlkem768/mlkem768_test.go
} func TestZetas(t *testing.T) { ζ := big.NewInt(17) q := big.NewInt(q) for k, zeta := range zetas { // ζ^BitRev7(k) mod q exp := new(big.Int).Exp(ζ, big.NewInt(int64(BitRev7(uint8(k)))), q) if big.NewInt(int64(zeta)).Cmp(exp) != 0 { t.Errorf("zetas[%d] = %v, expected %v", k, zeta, exp) } } } func TestGammas(t *testing.T) { ζ := big.NewInt(17) q := big.NewInt(q)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 15:27:18 UTC 2024 - 10.3K bytes - Viewed (0) -
pkg/registry/core/service/portallocator/allocator_test.go
} } func TestForEach(t *testing.T) { pr, err := net.ParsePortRange("10000-10200") if err != nil { t.Fatal(err) } testCases := []sets.Int{ sets.NewInt(), sets.NewInt(10000), sets.NewInt(10000, 10200), sets.NewInt(10000, 10099, 10200), } for i, tc := range testCases { r, err := NewInMemory(*pr) if err != nil { t.Fatal(err) } for port := range tc {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 08 07:15:02 UTC 2024 - 14K bytes - Viewed (0) -
src/cmd/compile/internal/walk/builtin.go
// panicmakeslicecap() // } nif := ir.NewIfStmt(base.Pos, ir.NewBinaryExpr(base.Pos, ir.OGT, typecheck.Conv(l, types.Types[types.TUINT64]), ir.NewInt(base.Pos, i)), nil, nil) niflen := ir.NewIfStmt(base.Pos, ir.NewBinaryExpr(base.Pos, ir.OLT, l, ir.NewInt(base.Pos, 0)), nil, nil) niflen.Body = []ir.Node{mkcall("panicmakeslicelen", nil, init)} nif.Body.Append(niflen, mkcall("panicmakeslicecap", nil, init))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 22:35:22 UTC 2024 - 31.2K bytes - Viewed (0) -
src/cmd/compile/internal/walk/switch.go
func(i int) ir.Node { return ir.NewBinaryExpr(base.Pos, ir.OLE, s.hashName, ir.NewInt(base.Pos, int64(cc[i-1].hash))) }, func(i int, nif *ir.IfStmt) { // TODO(mdempsky): Omit hash equality check if // there's only one type. c := cc[i] nif.Cond = ir.NewBinaryExpr(base.Pos, ir.OEQ, s.hashName, ir.NewInt(base.Pos, int64(c.hash))) nif.Body.Append(c.body.Take()...) }, ) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:34:01 UTC 2024 - 30.1K bytes - Viewed (0) -
src/cmd/compile/internal/walk/assign.go
ptr2, len2 := backingArrayPtrLen(l2) fn := typecheck.LookupRuntime("slicecopy", ptr1.Type().Elem(), ptr2.Type().Elem()) ncopy = mkcall1(fn, types.Types[types.TINT], &nodes, ptr1, len1, ptr2, len2, ir.NewInt(base.Pos, elemtype.Size())) } else { // memmove(&s[idx], &l2[0], len(l2)*sizeof(T)) ix := ir.NewIndexExpr(base.Pos, s, idx) ix.SetBounded(true) addr := typecheck.NodAddr(ix)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 17:09:06 UTC 2024 - 20.3K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/magic.go
d := uint64(c) << (64 - n) >> (64 - n) C := new(big.Int).SetUint64(d) s := C.BitLen() M := big.NewInt(1) M.Lsh(M, n+uint(s)) // 2^(n+s) M.Add(M, C) // 2^(n+s)+c M.Sub(M, big.NewInt(1)) // 2^(n+s)+c-1 M.Div(M, C) // ⎡2^(n+s)/c⎤ if M.Bit(int(n)) != 1 { panic("n+1st bit isn't set") } M.SetBit(M, int(n), 0) m := M.Uint64()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:25 UTC 2024 - 15.8K bytes - Viewed (0) -
src/crypto/internal/nistec/generate.go
log.Fatal(err) } // If p = 3 mod 4, implement modular square root by exponentiation. mod4 := new(big.Int).Mod(c.Params.P, big.NewInt(4)) if mod4.Cmp(big.NewInt(3)) != 0 { continue } exp := new(big.Int).Add(c.Params.P, big.NewInt(1)) exp.Div(exp, big.NewInt(4)) tmp, err := os.CreateTemp("", "addchain-"+p) if err != nil { log.Fatal(err) } defer os.Remove(tmp.Name())
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:29:44 UTC 2024 - 19.7K bytes - Viewed (0) -
src/crypto/ecdsa/ecdsa_test.go
hashToNat(c, bigmod.NewNat(), h) } } func TestZeroSignature(t *testing.T) { testAllCurves(t, testZeroSignature) } func testZeroSignature(t *testing.T, curve elliptic.Curve) { privKey, err := GenerateKey(curve, rand.Reader) if err != nil { panic(err) } if Verify(&privKey.PublicKey, make([]byte, 64), big.NewInt(0), big.NewInt(0)) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 21:33:58 UTC 2024 - 13.5K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/func.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 06 15:23:18 UTC 2024 - 21.1K bytes - Viewed (0) -
src/crypto/rsa/rsa.go
Qinv, err := bigmod.NewNat().SetBytes(priv.Precomputed.Qinv.Bytes(), P) if err != nil { return nil, ErrDecryption } c, err = bigmod.NewNat().SetBytes(ciphertext, N) if err != nil { return nil, ErrDecryption } // m = c ^ Dp mod p m = bigmod.NewNat().Exp(t0.Mod(c, P), priv.Precomputed.Dp.Bytes(), P) // m2 = c ^ Dq mod q
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 23.4K bytes - Viewed (0)