- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 69 for GetBytes (0.16 sec)
-
src/cmd/go/internal/test/test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 14:34:32 UTC 2024 - 71.9K bytes - Viewed (0) -
cmd/storage-datatypes_gen_test.go
bts := make([]byte, 0, v.Msgsize()) bts, _ = v.MarshalMsg(bts[0:0]) b.SetBytes(int64(len(bts))) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { bts, _ = v.MarshalMsg(bts[0:0]) } } func BenchmarkUnmarshalBaseOptions(b *testing.B) { v := BaseOptions{} bts, _ := v.MarshalMsg(nil) b.ReportAllocs() b.SetBytes(int64(len(bts))) b.ResetTimer() for i := 0; i < b.N; i++ {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 10 15:51:27 UTC 2024 - 62.6K bytes - Viewed (0) -
src/testing/benchmark.go
b.startBytes = memStats.TotalAlloc b.start = highPrecisionTimeNow() } b.duration = 0 b.netAllocs = 0 b.netBytes = 0 } // SetBytes records the number of bytes processed in a single operation. // If this is called, the benchmark will report ns/op and MB/s. func (b *B) SetBytes(n int64) { b.bytes = n } // ReportAllocs enables malloc statistics for this benchmark.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 23.9K bytes - Viewed (0) -
src/encoding/binary/binary_test.go
} func BenchmarkPutUint16(b *testing.B) { b.SetBytes(2) for i := 0; i < b.N; i++ { BigEndian.PutUint16(putbuf[:2], uint16(i)) } } func BenchmarkAppendUint16(b *testing.B) { b.SetBytes(2) for i := 0; i < b.N; i++ { putbuf = BigEndian.AppendUint16(putbuf[:0], uint16(i)) } } func BenchmarkPutUint32(b *testing.B) { b.SetBytes(4) for i := 0; i < b.N; i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 19:16:18 UTC 2024 - 25.4K bytes - Viewed (0) -
src/crypto/ecdsa/ecdsa.go
Q, err := c.pointFromAffine(pub.X, pub.Y) if err != nil { return false } // SEC 1, Version 2.0, Section 4.1.4 r, err := bigmod.NewNat().SetBytes(rBytes, c.N) if err != nil || r.IsZero() == 1 { return false } s, err := bigmod.NewNat().SetBytes(sBytes, c.N) if err != nil || s.IsZero() == 1 { return false } e := bigmod.NewNat() hashToNat(c, e, hash) // w = s⁻¹
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 20.4K bytes - Viewed (0) -
src/crypto/ecdsa/ecdsa_legacy.go
} func verifyLegacy(pub *PublicKey, hash []byte, sig []byte) bool { rBytes, sBytes, err := parseSignature(sig) if err != nil { return false } r, s := new(big.Int).SetBytes(rBytes), new(big.Int).SetBytes(sBytes) c := pub.Curve N := c.Params().N if r.Sign() <= 0 || s.Sign() <= 0 { return false } if r.Cmp(N) >= 0 || s.Cmp(N) >= 0 { return false }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 4.8K bytes - Viewed (0) -
src/crypto/ecdh/nist.go
} if boring.Enabled { bk, err := boring.NewPublicKeyECDH(c.name, k.publicKey) if err != nil { return nil, err } k.boring = bk } else { // SetBytes also checks that the point is on the curve. if _, err := c.newPoint().SetBytes(key); err != nil { return nil, err } } return k, nil } func (c *nistCurve[Point]) ecdh(local *PrivateKey, remote *PublicKey) ([]byte, error) {
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/encoding/hex/hex_test.go
b.Run(fmt.Sprintf("%v", size), func(b *testing.B) { b.SetBytes(int64(size)) for i := 0; i < b.N; i++ { Decode(sink, src) } }) } } func BenchmarkDecodeString(b *testing.B) { for _, size := range []int{256, 1024, 4096, 16384} { src := strings.Repeat("2b744faa", size/8) b.Run(fmt.Sprintf("%v", size), func(b *testing.B) { b.SetBytes(int64(size)) for i := 0; i < b.N; i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 19:30:23 UTC 2024 - 7.9K bytes - Viewed (0) -
src/math/big/ratmarsh.go
return errors.New("Rat.GobDecode: invalid length") } i := j + int(ln) if len(buf) < i { return errors.New("Rat.GobDecode: buffer too small") } z.a.neg = b&1 != 0 z.a.abs = z.a.abs.setBytes(buf[j:i]) z.b.abs = z.b.abs.setBytes(buf[i:]) return nil } // MarshalText implements the [encoding.TextMarshaler] interface. func (x *Rat) MarshalText() (text []byte, err error) { if x.IsInt() { return x.a.MarshalText() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:31:58 UTC 2024 - 2.2K bytes - Viewed (0) -
src/math/big/int_test.go
i := 0 for i < len(z) && z[i] == 0 { i++ } return z[i:] } func checkMul(a, b []byte) bool { var x, y, z1 Int x.SetBytes(a) y.SetBytes(b) z1.Mul(&x, &y) var z2 Int z2.SetBytes(mulBytes(a, b)) return z1.Cmp(&z2) == 0 } func TestMul(t *testing.T) { if err := quick.Check(checkMul, nil); err != nil { t.Error(err) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 58.5K bytes - Viewed (0)