Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for writeLengthPrefixedString (0.25 sec)

  1. staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator.go

    	h := hashPool.Get().(hash.Hash)
    
    	h.Reset()
    
    	// try to force stack allocation
    	var a [4]byte
    	b := a[:]
    
    	writeLengthPrefixedString(h, b, token)
    	// encode the length of audiences to avoid ambiguities
    	writeLength(h, b, len(auds))
    	for _, aud := range auds {
    		writeLengthPrefixedString(h, b, aud)
    	}
    
    	key := toString(h.Sum(nil)) // skip base64 encoding to save an allocation
    
    	hashPool.Put(h)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 9.8K bytes
    - Viewed (0)
Back to top