- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 1,741 for setString (0.18 sec)
-
src/crypto/rsa/boring_test.go
if err != nil { panic(err) // usually caused by memory corruption, so hard stop } }() } wg.Wait() } } func bigFromHex(hex string) *big.Int { n, ok := new(big.Int).SetString(hex, 16) if !ok { panic("bad hex: " + hex) } return n } func fromHex(hexStr string) []byte { s, err := hex.DecodeString(hexStr) if err != nil { panic(err) } return s
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 15 00:16:30 UTC 2022 - 4.5K bytes - Viewed (0) -
src/math/big/floatconv.go
) var floatZero Float // SetString sets z to the value of s and returns z and a boolean indicating // success. s must be a floating-point number of the same format as accepted // by [Float.Parse], with base argument 0. The entire string (not just a prefix) must // be valid for success. If the operation failed, the value of z is undefined // but the returned value is nil. func (z *Float) SetString(s string) (*Float, bool) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 8.3K bytes - Viewed (0) -
schema/field.go
if data != nil && *data != nil { field.ReflectValueOf(ctx, value).SetString(**data) } case string: field.ReflectValueOf(ctx, value).SetString(data) case []byte: field.ReflectValueOf(ctx, value).SetString(string(data)) case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64: field.ReflectValueOf(ctx, value).SetString(utils.ToString(data)) case float64, float32:
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Apr 15 03:20:20 UTC 2024 - 32K bytes - Viewed (0) -
src/encoding/xml/read.go
return err } switch t := saveComment; t.Kind() { case reflect.String: t.SetString(string(comment)) case reflect.Slice: t.Set(reflect.ValueOf(comment)) } switch t := saveXML; t.Kind() { case reflect.String: t.SetString(string(saveXMLData)) case reflect.Slice: if t.Type().Elem().Kind() == reflect.Uint8 { t.Set(reflect.ValueOf(saveXMLData)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:04:28 UTC 2023 - 22.4K bytes - Viewed (0) -
src/math/big/nat_test.go
} func runModWTests(t *testing.T, tests []modWTest) { for i, test := range tests { in, _ := new(Int).SetString(test.in, 10) d, _ := new(Int).SetString(test.dividend, 10) out, _ := new(Int).SetString(test.out, 10) r := in.abs.modW(d.abs[0]) if r != out.abs[0] { t.Errorf("#%d failed: got %d want %s", i, r, out) } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 09 15:29:36 UTC 2024 - 26.2K bytes - Viewed (0) -
src/crypto/internal/bigmod/nat_test.go
// return correct results. See https://go.dev/issue/13907. func TestMulReductions(t *testing.T) { // Two short but multi-limb primes. a, _ := new(big.Int).SetString("773608962677651230850240281261679752031633236267106044359907", 10) b, _ := new(big.Int).SetString("180692823610368451951102211649591374573781973061758082626801", 10) n := new(big.Int).Mul(a, b) N, _ := NewModulusFromBig(n) A := NewNat().setBig(a).ExpandFor(N)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jan 12 00:56:20 UTC 2024 - 11.6K bytes - Viewed (0) -
src/crypto/internal/edwards25519/scalar_test.go
} else if out != nil { t.Errorf("SetCanonicalBytes did not return nil with an error") } } func TestScalarSetUniformBytes(t *testing.T) { mod, _ := new(big.Int).SetString("27742317777372353535851937790883648493", 10) mod.Add(mod, new(big.Int).Lsh(big.NewInt(1), 252)) f := func(in [64]byte, sc Scalar) bool { sc.SetUniformBytes(in[:]) repr := sc.Bytes() if !isReduced(repr) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 28 17:26:17 UTC 2023 - 7.6K bytes - Viewed (0) -
src/math/big/int.go
// and act like any other character that is not a valid digit. func (z *Int) SetString(s string, base int) (*Int, bool) { return z.setFromScanner(strings.NewReader(s), base) } // setFromScanner implements SetString given an io.ByteScanner. // For documentation see comments of SetString. func (z *Int) setFromScanner(r io.ByteScanner, base int) (*Int, bool) { if _, _, err := z.scan(r, base); err != nil {
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/database/sql/convert.go
return nil case reflect.String: if src == nil { return fmt.Errorf("converting NULL to %s is unsupported", dv.Kind()) } switch v := src.(type) { case string: dv.SetString(v) return nil case []byte: dv.SetString(string(v)) return nil } } return fmt.Errorf("unsupported Scan, storing driver.Value type %T into type %T", src, dest) } func strconvErr(err error) error {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 16.2K bytes - Viewed (0) -
src/crypto/rsa/pss_test.go
t.Fatal(err) } err = VerifyPSS(&key.PublicKey, crypto.SHA256, digest[:], signature, nil) if err != nil { t.Error(err) } } func bigFromHex(hex string) *big.Int { n, ok := new(big.Int).SetString(hex, 16) if !ok { panic("bad hex: " + hex) } return n } func intFromHex(hex string) int { i, err := strconv.ParseInt(hex, 16, 32) if err != nil { panic(err) } return int(i)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 8.8K bytes - Viewed (0)