code: func (k *Kontrol) AddKeyPair(id, public, private string) error {
  	if k.keyPair == nil {
  		k.log.Warning("Key pair storage is not set. Using in memory cache")
  		k.keyPair = NewMemKeyPairStorage()
  	}
  
  	if id == "" {
  		i, err := uuid.NewV4()
  		if err != nil {
  			return err
  		}
  		id = i.String()
  	}
  
  	public = strings.TrimSpace(public)
  	private = strings.TrimSpace(private)
  
  	keyPair := &KeyPair{
  		ID:      id,
  		Public:  public,
  		Private: private,
  	}
  
  	// set last set key pair
  	k.lastIDs = append(k.lastIDs, id)
  	k.lastPublic = append(k.lastPublic, public)
  	k.lastPrivate = append(k.lastPrivate, private)
  
  	if err := keyPair.Validate(); err != nil {
  		return err
  	}
  
  	return k.keyPair.AddKey(keyPair)
  }
docs: // AddKeyPair add the given key pair so it can be used to validate and
  // sign/generate tokens. If id is empty, a unique ID will be generated. The
  // last added key pair is also used to generate tokens for machine
  // registrations via "handleMachine" method. This can be overiden with the
  // kontorl.MachineKeyPicker function.