- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 226 for newInt (0.12 sec)
-
src/crypto/internal/edwards25519/scalar_test.go
} } 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) { return false } scBig := bigIntFromLittleEndianBytes(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/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/math/big/bits_test.go
return new(Float) } // len(bits) > 0 // determine lsb exponent var min int for i, b := range bits { if i == 0 || b < min { min = b } } // create bit pattern x := NewInt(0) for _, b := range bits { badj := b - min // propagate carry if necessary for x.Bit(badj) != 0 { x.SetBit(x, badj, 0) badj++ } x.SetBit(x, badj, 1) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 5.1K bytes - Viewed (0) -
pkg/apis/certificates/validation/validation_test.go
goodCert1 := mustMakeCertificate(t, &x509.Certificate{ SerialNumber: big.NewInt(0), Subject: pkix.Name{ CommonName: "root1", }, IsCA: true, BasicConstraintsValid: true, }) goodCert2 := mustMakeCertificate(t, &x509.Certificate{ SerialNumber: big.NewInt(0), Subject: pkix.Name{ CommonName: "root2", }, IsCA: true,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 03 18:40:49 UTC 2023 - 61K 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) -
src/crypto/dsa/dsa.go
// in math/big.Int.ModInverse) although math/big itself isn't strictly // constant-time so it's not perfect. func fermatInverse(k, P *big.Int) *big.Int { two := big.NewInt(2) pMinus2 := new(big.Int).Sub(P, two) return new(big.Int).Exp(k, pMinus2, P) } // Sign signs an arbitrary length hash (which should be the result of hashing a
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 7.2K bytes - Viewed (0) -
pkg/registry/certificates/certificates/storage/metrics_test.go
now := time.Now() tmpl := &x509.Certificate{Subject: pkix.Name{CommonName: "panda"}, SerialNumber: big.NewInt(1234), NotBefore: now, NotAfter: now.Add(duration)} der, err := x509.CreateCertificate(rand.Reader, tmpl, caCert, crPublicKey, caPrivateKey) if err != nil { t.Fatal(err) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 15 14:34:53 UTC 2024 - 13.7K bytes - Viewed (0) -
src/expvar/expvar.go
// not been registered. func Get(name string) Var { return vars.Get(name) } // Convenience functions for creating new exported variables. func NewInt(name string) *Int { v := new(Int) Publish(name, v) return v } func NewFloat(name string) *Float { v := new(Float) Publish(name, v) return v } func NewMap(name string) *Map {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 21:32:11 UTC 2024 - 9.1K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/resource/amount.go
func (a infDecAmount) AsCanonicalBytes(out []byte) (result []byte, exponent int32) { mantissa := a.Dec.UnscaledBig() exponent = int32(-a.Dec.Scale()) amount := big.NewInt(0).Set(mantissa) // move all factors of 10 into the exponent for easy reasoning amount, times := removeBigIntFactors(amount, bigTen) exponent += times // make sure exponent is a multiple of 3
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Oct 13 19:42:28 UTC 2023 - 9.3K bytes - Viewed (0)