Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 53 for hashHead (0.11 sec)

  1. src/compress/flate/deflate.go

    	// Input hash chains
    	// hashHead[hashValue] contains the largest inputIndex with the specified hash value
    	// If hashHead[hashValue] is within the current window, then
    	// hashPrev[hashHead[hashValue] & windowMask] contains the previous index
    	// with the same hash value.
    	chainHead  int
    	hashHead   [hashSize]uint32
    	hashPrev   [windowSize]uint32
    	hashOffset int
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:40 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  2. src/crypto/internal/boring/rsa.go

    		return C._goboringcrypto_RSA_sign_pss_mgf1(key, &outLen, base(out), C.size_t(len(out)),
    			base(hashed), C.size_t(len(hashed)), md, nil, C.int(saltLen))
    	}) == 0 {
    		return nil, fail("RSA_sign_pss_mgf1")
    	}
    
    	return out[:outLen], nil
    }
    
    func VerifyRSAPSS(pub *PublicKeyRSA, h crypto.Hash, hashed, sig []byte, saltLen int) error {
    	md := cryptoHashToMD(h)
    	if md == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 23:38:03 UTC 2024
    - 12K bytes
    - Viewed (0)
  3. src/crypto/ecdsa/ecdsa_test.go

    	priv, _ := GenerateKey(c, rand.Reader)
    
    	hashed := []byte("testing")
    	r, s, err := Sign(rand.Reader, priv, hashed)
    	if err != nil {
    		t.Errorf("error signing: %s", err)
    		return
    	}
    
    	if !Verify(&priv.PublicKey, hashed, r, s) {
    		t.Errorf("Verify failed")
    	}
    
    	hashed[0] ^= 0xff
    	if Verify(&priv.PublicKey, hashed, r, s) {
    		t.Errorf("Verify always works!")
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:33:58 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  4. src/crypto/rsa/pkcs1v15.go

    	k := pub.Size()
    	if k < len(prefix)+len(hashed)+2+8+1 {
    		return nil, ErrMessageTooLong
    	}
    	em := make([]byte, k)
    	em[1] = 1
    	for i := 2; i < k-len(prefix)-len(hashed)-1; i++ {
    		em[i] = 0xff
    	}
    	copy(em[k-len(prefix)-len(hashed):], prefix)
    	copy(em[k-len(hashed):], hashed)
    	return em, nil
    }
    
    // VerifyPKCS1v15 verifies an RSA PKCS #1 v1.5 signature.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:21 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  5. src/crypto/rsa/rsa_test.go

    	b.Run("2048", func(b *testing.B) {
    		hashed := sha256.Sum256([]byte("testing"))
    		s, err := SignPKCS1v15(rand.Reader, test2048Key, crypto.SHA256, hashed[:])
    		if err != nil {
    			b.Fatal(err)
    		}
    
    		b.ResetTimer()
    		for i := 0; i < b.N; i++ {
    			err := VerifyPKCS1v15(&test2048Key.PublicKey, crypto.SHA256, hashed[:], s)
    			if err != nil {
    				b.Fatal(err)
    			}
    		}
    	})
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 12 00:55:41 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  6. src/cmd/internal/goobj/objfile.go

    }
    
    // Hash64 returns the i-th short hashed symbol's hash.
    // Note: here i is the index of short hashed symbols, not all symbols
    // (unlike other accessors).
    func (r *Reader) Hash64(i uint32) uint64 {
    	off := r.h.Offsets[BlkHash64] + uint32(i*Hash64Size)
    	return r.uint64At(off)
    }
    
    // Hash returns a pointer to the i-th hashed symbol's hash.
    // Note: here i is the index of hashed symbols, not all symbols
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  7. src/crypto/rsa/pss.go

    	}
    	return nil
    }
    
    // signPSSWithSalt calculates the signature of hashed using PSS with specified salt.
    // Note that hashed must be the result of hashing the input message using the
    // given hash function. salt is a random sequence of bytes whose length will be
    // later used to verify the signature.
    func signPSSWithSalt(priv *PrivateKey, hash crypto.Hash, hashed, salt []byte) ([]byte, error) {
    	emBits := priv.N.BitLen() - 1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 11K bytes
    - Viewed (0)
  8. src/crypto/ed25519/ed25519.go

    }
    
    // Sign signs the given message with priv. rand is ignored and can be nil.
    //
    // If opts.HashFunc() is [crypto.SHA512], the pre-hashed variant Ed25519ph is used
    // and message is expected to be a SHA-512 hash, otherwise opts.HashFunc() must
    // be [crypto.Hash](0) and the message must not be hashed, as Ed25519 performs two
    // passes over messages to be signed.
    //
    // A value of type [Options] can be used as opts, or crypto.Hash(0) or
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  9. src/crypto/tls/auth.go

    import (
    	"bytes"
    	"crypto"
    	"crypto/ecdsa"
    	"crypto/ed25519"
    	"crypto/elliptic"
    	"crypto/rsa"
    	"errors"
    	"fmt"
    	"hash"
    	"io"
    )
    
    // verifyHandshakeSignature verifies a signature against pre-hashed
    // (if required) handshake contents.
    func verifyHandshakeSignature(sigType uint8, pubkey crypto.PublicKey, hashFunc crypto.Hash, signed, sig []byte) error {
    	switch sigType {
    	case signatureECDSA:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:45:37 UTC 2024
    - 10K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/cache/Striped64.java

       * CASes when performing an update operation (see method
       * retryUpdate). Upon a collision, if the table size is less than
       * the capacity, it is doubled in size unless some other thread
       * holds the lock. If a hashed slot is empty, and lock is
       * available, a new Cell is created. Otherwise, if the slot
       * exists, a CAS is tried.  Retries proceed by "double hashing",
       * using a secondary hash (Marsaglia XorShift) to try to find a
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Jun 07 22:25:23 UTC 2024
    - 11.5K bytes
    - Viewed (0)
Back to top