- Sort Score
- Result 10 results
- Languages All
Results 11 - 16 of 16 for GetBytes (0.17 sec)
-
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) -
internal/config/crypto_test.go
} benchmarkEncrypt := func(size int, b *testing.B) { var ( data = make([]byte, size) plaintext = bytes.NewReader(data) context = kms.Context{"key": "value"} ) b.SetBytes(int64(size)) for i := 0; i < b.N; i++ { ciphertext, err := Encrypt(KMS, plaintext, context) if err != nil { b.Fatal(err) } if _, err = io.Copy(io.Discard, ciphertext); err != nil {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue May 07 23:55:37 UTC 2024 - 3.2K bytes - Viewed (0) -
src/math/big/floatmarsh.go
if z.form == finite { if len(buf) < 10 { return errors.New("Float.GobDecode: buffer too small for finite form float") } z.exp = int32(byteorder.BeUint32(buf[6:])) z.mant = z.mant.setBytes(buf[10:]) } if oldPrec != 0 { z.mode = oldMode z.SetPrec(uint(oldPrec)) } if msg := z.validate0(); msg != "" { return errors.New("Float.GobDecode: " + msg) } return nil
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:31:58 UTC 2024 - 3.6K bytes - Viewed (0)