Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for hashFunc (0.21 sec)

  1. src/crypto/tls/auth_test.go

    	}
    
    	sigType, hashFunc, err = legacyTypeAndHashFromPublicKey(testECDSAPrivateKey.Public())
    	if err != nil {
    		t.Errorf("ECDSA: unexpected error: %v", err)
    	}
    	if expectedSigType := signatureECDSA; expectedSigType != sigType {
    		t.Errorf("ECDSA: expected signature type %#x, got %#x", expectedSigType, sigType)
    	}
    	if expectedHashFunc := crypto.SHA1; expectedHashFunc != hashFunc {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 08 21:48:41 UTC 2020
    - 6.9K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cache_striped.go

    	"hash/fnv"
    	"time"
    )
    
    // split cache lookups across N striped caches
    type stripedCache struct {
    	stripeCount uint32
    	hashFunc    func(string) uint32
    	caches      []cache
    }
    
    type hashFunc func(string) uint32
    type newCacheFunc func() cache
    
    func newStripedCache(stripeCount int, hash hashFunc, newCacheFunc newCacheFunc) cache {
    	caches := []cache{}
    	for i := 0; i < stripeCount; i++ {
    		caches = append(caches, newCacheFunc())
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 22 17:16:59 UTC 2018
    - 1.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/hash/MacHashFunctionTest.java

          byte[] input, String algorithm, SecretKey key, HashFunction hashFunc) throws Exception {
        Mac mac = Mac.getInstance(algorithm);
        mac.init(key);
        mac.update(input);
    
        assertEquals(HashCode.fromBytes(mac.doFinal()), hashFunc.hashBytes(input));
        assertEquals(HashCode.fromBytes(mac.doFinal(input)), hashFunc.hashBytes(input));
      }
    
      // Tests from RFC2022: https://tools.ietf.org/html/rfc2202
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 13.8K bytes
    - Viewed (0)
  4. src/crypto/crypto.go

    import (
    	"hash"
    	"io"
    	"strconv"
    )
    
    // Hash identifies a cryptographic hash function that is implemented in another
    // package.
    type Hash uint
    
    // HashFunc simply returns the value of h so that [Hash] implements [SignerOpts].
    func (h Hash) HashFunc() Hash {
    	return h
    }
    
    func (h Hash) String() string {
    	switch h {
    	case MD4:
    		return "MD4"
    	case MD5:
    		return "MD5"
    	case SHA1:
    		return "SHA-1"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  5. src/crypto/ed25519/ed25519.go

    	return bytes.Clone(priv[:SeedSize])
    }
    
    // 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.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/hash/MacHashFunctionTest.java

          byte[] input, String algorithm, SecretKey key, HashFunction hashFunc) throws Exception {
        Mac mac = Mac.getInstance(algorithm);
        mac.init(key);
        mac.update(input);
    
        assertEquals(HashCode.fromBytes(mac.doFinal()), hashFunc.hashBytes(input));
        assertEquals(HashCode.fromBytes(mac.doFinal(input)), hashFunc.hashBytes(input));
      }
    
      // Tests from RFC2022: https://tools.ietf.org/html/rfc2202
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 13.8K bytes
    - Viewed (0)
  7. src/crypto/tls/auth.go

    		}
    		if err := rsa.VerifyPKCS1v15(pubKey, hashFunc, signed, sig); err != nil {
    			return err
    		}
    	case signatureRSAPSS:
    		pubKey, ok := pubkey.(*rsa.PublicKey)
    		if !ok {
    			return fmt.Errorf("expected an RSA public key, got %T", pubkey)
    		}
    		signOpts := &rsa.PSSOptions{SaltLength: rsa.PSSSaltLengthEqualsHash}
    		if err := rsa.VerifyPSS(pubKey, hashFunc, signed, sig, signOpts); err != nil {
    			return err
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:45:37 UTC 2024
    - 10K bytes
    - Viewed (0)
  8. src/crypto/tls/prf.go

    func prf12(hashFunc func() hash.Hash) func(result, secret, label, seed []byte) {
    	return func(result, secret, label, seed []byte) {
    		labelAndSeed := make([]byte, len(label)+len(seed))
    		copy(labelAndSeed, label)
    		copy(labelAndSeed[len(label):], seed)
    
    		pHash(result, secret, labelAndSeed, hashFunc)
    	}
    }
    
    const (
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 16:29:49 UTC 2023
    - 9.2K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/print.go

    package ssa
    
    import (
    	"fmt"
    	"io"
    	"strings"
    
    	"cmd/internal/notsha256"
    	"cmd/internal/src"
    )
    
    func printFunc(f *Func) {
    	f.Logf("%s", f)
    }
    
    func hashFunc(f *Func) []byte {
    	h := notsha256.New()
    	p := stringFuncPrinter{w: h, printDead: true}
    	fprintFunc(p, f)
    	return h.Sum(nil)
    }
    
    func (f *Func) String() string {
    	var buf strings.Builder
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 31 21:41:20 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  10. src/crypto/tls/key_agreement.go

    func hashForServerKeyExchange(sigType uint8, hashFunc crypto.Hash, version uint16, slices ...[]byte) []byte {
    	if sigType == signatureEd25519 {
    		var signed []byte
    		for _, slice := range slices {
    			signed = append(signed, slice...)
    		}
    		return signed
    	}
    	if version >= VersionTLS12 {
    		h := hashFunc.New()
    		for _, slice := range slices {
    			h.Write(slice)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 14:56:25 UTC 2024
    - 11.8K bytes
    - Viewed (0)
Back to top