code: func (r *keyring) Sign(key ssh.PublicKey, data []byte) (*ssh.Signature, error) {
  	r.mu.Lock()
  	defer r.mu.Unlock()
  	if r.locked {
  		return nil, errLocked
  	}
  
  	wanted := key.Marshal()
  	for _, k := range r.keys {
  		if bytes.Equal(k.signer.PublicKey().Marshal(), wanted) {
  			return k.signer.Sign(rand.Reader, data)
  		}
  	}
  	return nil, errors.New("not found")
  }
docs: // Sign returns a signature for the data.