code: func AEStoEncryptedPEM(raw []byte, pwd []byte) ([]byte, error) {
  	if len(raw) == 0 {
  		return nil, errors.New("Invalid aes key. It must be different from nil")
  	}
  	if len(pwd) == 0 {
  		return AEStoPEM(raw), nil
  	}
  
  	block, err := x509.EncryptPEMBlock(
  		rand.Reader,
  		"AES PRIVATE KEY",
  		raw,
  		pwd,
  		x509.PEMCipherAES256)
  
  	if err != nil {
  		return nil, err
  	}
  
  	return pem.EncodeToMemory(block), nil
  }
docs: // AEStoEncryptedPEM encapsulates an AES key in the encrypted PEM format