code: func (k *KeyReadWriter) ViewAndUpdateHeaders(cb func(PEMKeyHeaders) (PEMKeyHeaders, error)) error {
  	k.mu.Lock()
  	defer k.mu.Unlock()
  
  	pkh, err := cb(k.headersObj)
  	if err != nil {
  		return err
  	}
  
  	keyBlock, err := k.readKeyblock()
  	if err != nil {
  		return err
  	}
  
  	headers := make(map[string]string)
  	if pkh != nil {
  		var err error
  		headers, err = pkh.MarshalHeaders(k.kekData)
  		if err != nil {
  			return err
  		}
  	}
  	// we WANT any original encryption headers
  	for key, value := range keyBlock.Headers {
  		normalizedKey := strings.TrimSpace(strings.ToLower(key))
  		if normalizedKey == "proc-type" || normalizedKey == "dek-info" {
  			headers[key] = value
  		}
  	}
  	headers[versionHeader] = strconv.FormatUint(k.kekData.Version, 10)
  	keyBlock.Headers = headers
  
  	if err = ioutils.AtomicWriteFile(k.paths.Key, pem.EncodeToMemory(keyBlock), keyPerms); err != nil {
  		return err
  	}
  	k.headersObj = pkh
  	return nil
  }
docs: // ViewAndUpdateHeaders updates the header manager, and updates any headers on the existing key