code: func partitionKeys(keys []Key) ([]*rsa.PublicKey, []*ecdsa.PublicKey, [][]byte) {
  	var (
  		rsaKeys   []*rsa.PublicKey
  		ecdsaKeys []*ecdsa.PublicKey
  		hmacKeys  [][]byte
  	)
  
  	for _, key := range keys {
  		switch k := key.(type) {
  		case *rsa.PublicKey:
  			rsaKeys = append(rsaKeys, k)
  		case *ecdsa.PublicKey:
  			ecdsaKeys = append(ecdsaKeys, k)
  		case []byte:
  			hmacKeys = append(hmacKeys, k)
  		case string:
  			hmacKeys = append(hmacKeys, []byte(k))
  		}
  	}
  
  	return rsaKeys, ecdsaKeys, hmacKeys
  }
docs: // partitionKeys sorts keys by their type.