- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 62 for BeUint64 (0.14 sec)
-
src/math/big/int.go
// changes must be reviewed by a security expert. if len(x.abs) == 0 { return 0 } if x.neg { return -1 } return 1 } // SetInt64 sets z to x and returns z. func (z *Int) SetInt64(x int64) *Int { neg := false if x < 0 { neg = true x = -x } z.abs = z.abs.setUint64(uint64(x)) z.neg = neg return z } // SetUint64 sets z to x and returns z.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 14 17:02:38 UTC 2024 - 33.1K bytes - Viewed (0) -
src/crypto/ecdh/nist.go
bufA[i], bufB[i] = a[len(a)-i-1], b[len(b)-i-1] } // Perform a subtraction with borrow. var borrow uint64 for i := 0; i < len(bufA); i += 8 { limbA, limbB := byteorder.LeUint64(bufA[i:]), byteorder.LeUint64(bufB[i:]) _, borrow = bits.Sub64(limbA, limbB, borrow) } // If there is a borrow at the end of the operation, then a < b. return borrow == 1 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 8.1K bytes - Viewed (0) -
src/math/big/rat.go
if b == 0 { panic("division by zero") } z.a.SetInt64(a) if b < 0 { b = -b z.a.neg = !z.a.neg } z.b.abs = z.b.abs.setUint64(uint64(b)) return z.norm() } // SetInt sets z to x (by making a copy of x) and returns z. func (z *Rat) SetInt(x *Int) *Rat { z.a.Set(x) z.b.abs = z.b.abs.setWord(1) return z } // SetInt64 sets z to x and returns z.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 13.5K bytes - Viewed (0) -
src/crypto/dsa/dsa.go
return errors.New("crypto/dsa: invalid ParameterSizes") } qBytes := make([]byte, N/8) pBytes := make([]byte, L/8) q := new(big.Int) p := new(big.Int) rem := new(big.Int) one := new(big.Int) one.SetInt64(1) GeneratePrimes: for { if _, err := io.ReadFull(rand, qBytes); err != nil { return err } qBytes[len(qBytes)-1] |= 1 qBytes[0] |= 0x80 q.SetBytes(qBytes)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 7.2K bytes - Viewed (0) -
src/crypto/elliptic/elliptic_test.go
t.Error("basepoint is not on the curve") } }) } func TestOffCurve(t *testing.T) { t.Parallel() testAllCurves(t, func(t *testing.T, curve Curve) { x, y := new(big.Int).SetInt64(1), new(big.Int).SetInt64(1) if curve.IsOnCurve(x, y) { t.Errorf("point off curve is claimed to be on the curve") } byteLen := (curve.Params().BitSize + 7) / 8 b := make([]byte, 1+2*byteLen)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 27 02:00:03 UTC 2023 - 11.6K bytes - Viewed (0) -
src/cmd/compile/internal/ir/const.go
ConstPrec = 512 ) func BigFloat(v constant.Value) *big.Float { f := new(big.Float) f.SetPrec(ConstPrec) switch u := constant.Val(v).(type) { case int64: f.SetInt64(u) case *big.Int: f.SetInt(u) case *big.Float: f.Set(u) case *big.Rat: f.SetRat(u) default: base.Fatalf("unexpected: %v", u) } return f }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 12 18:53:26 UTC 2023 - 4K bytes - Viewed (0) -
src/crypto/elliptic/params.go
// 0) is not on the any of the curves handled here. func zForAffine(x, y *big.Int) *big.Int { z := new(big.Int) if x.Sign() != 0 || y.Sign() != 0 { z.SetInt64(1) } return z } // affineFromJacobian reverses the Jacobian transform. See the comment at the // top of the file. If the point is ∞ it returns 0, 0.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 16 17:46:09 UTC 2024 - 9.6K bytes - Viewed (0) -
pilot/test/mock/config.go
func CheckCacheEvents(store model.ConfigStore, cache model.ConfigStoreController, namespace string, n int, t *testing.T) { n64 := int64(n) stop := make(chan struct{}) defer close(stop) added, deleted := atomic.NewInt64(0), atomic.NewInt64(0) cache.RegisterEventHandler(mockGvk, func(_, _ config2.Config, ev model.Event) { switch ev { case model.EventAdd: if deleted.Load() != 0 { t.Errorf("Events are not serialized (add)") }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 17:08:31 UTC 2023 - 13.2K bytes - Viewed (0) -
src/syscall/dir_plan9.go
return byteorder.LeUint32(b), b[4:] } // gbit64 reads a 64-bit number in little-endian order from b and returns it with the remaining slice of b. func gbit64(b []byte) (uint64, []byte) { return byteorder.LeUint64(b), b[8:] } // gstring reads a string from b, prefixed with a 16-bit length in little-endian order. // It returns the string with the remaining slice of b and a boolean. If the length is
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 19:32:38 UTC 2024 - 5.2K bytes - Viewed (0) -
src/crypto/ecdsa/ecdsa_legacy.go
x, y := c.Add(x1, y1, x2, y2) if x.Sign() == 0 && y.Sign() == 0 { return false } x.Mod(x, N) return x.Cmp(r) == 0 } var one = new(big.Int).SetInt64(1) // randFieldElement returns a random element of the order of the given // curve using the procedure given in FIPS 186-4, Appendix B.5.2. func randFieldElement(c elliptic.Curve, rand io.Reader) (k *big.Int, err error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 4.8K bytes - Viewed (0)