Avoid short, curt messages via text
Others have suggested that you respond with curt text messages like, "I don't discuss dealings with other businesses."
No, please don't text or email your boss telling him or her that it's none of your business or that you don't feel you should discuss salary information with him or her. When you text or email your boss, there's no body language, and it may very well come off as rude, impersonal, or dismissive, even if you're not trying to be caustic by implying that it's none of his business.
Use in-person communication throughout the entire process:
Although the following research relates to notifying your boss that you're quitting, the information is still very much relevant since you're in transition and your boss may attempt to try to change your mind. In this Business Insider article titled, How To Tell Your Boss That You're Quitting, Jason Calacanas, CEO of Mahalo, says that the worst way you can resign is by email and the best way is to sit down and have a face to face talk.
Thus, what you should do, regardless of whether you disclose your salary information or not, is to discuss this with your boss, in person. Any questions related to your resignation should be done in person. If there's anything you need to document, send a professional, polite follow up email, but be sure to communicate in person.
While this is business, keep in mind that you were essentially in a long-term relationship with your boss, and now you're ending that relationship. It doesn't technically end until your very last day on the job, so it's important to end this relationship on a positive note, as you don't know what the future holds. According to The Art of Manliness's article How to Quit a Job Without Burning Bridges, we live in a small world, and you may very well need something from your former employer, whether that be a recommendation letter or even possibly returning to your employer in a new position!
Despite all the talk you hear about living in a globalized society, the working world is a surprisingly small place. And whether you’re leaving your current position for another company, or going into business for yourself, you never know when you’ll be working with, asking a favor of, or needing a recommendation from a former boss or co-worker.
Handle requests for salary information the same, in-person.
As for what to do when your boss asks you for salary information, consider that it's quite common for employers to make counter-offers to preserve the business relationship. If I was your boss, I would want to take some time to think about what sort of counteroffer I might propose, so like your boss, I might wait awhile before reaching out to you. This isn't something you should find offensive.
Now, while the boss did initiate the request for this salary information as a text message, you still should respond in person. It's difficult to negotiate through such a communication medium, and much is lost in translation. There's no body language through text, and the amount of information you can typically send in a text message is quite limited. Even if you don't want to disclose the salary information, just simply respond with this text:
"Hey Boss, let's talk more about this tomorrow at your convenience. Looking forward to meeting with you."
Remember, quitting a job is like quitting any other relationship. You're dealing with real people with real feelings and emotions, and you want to be sure you approach this professionally and with care, even if you have to be the one to control the communication medium.
If you really are planning on leaving the company and know you won't take any counteroffers, you might say the following statement when you do meet again in person:
Hi Boss, thanks for taking the time to meet with me. Are you asking for my salary information so you can make a counteroffer? If so, I'm really sorry, I appreciate the gesture, but I've been presented with an opportunity at Company Y that I just can't refuse. I appreciate everything I've learned working here and wish you the best, but I feel it's time for me to move on.
Following the golden rule in this case will ensure that no doors get slammed shut, doors that you may one day need to reopen.
If this doesn't convince you, consider this comment I left on a related Workplace SE post:
It's not uncommon for employees to return to previous employers, according to this Finance Fox article. I myself have returned to a call center job twice and a restaurant I worked at once, an internship, and I've known people who have returned to their previous employers as well, which even includes members of the military. It pays to not burn bridges, give the two weeks notice, and be respectful. You never know who you might run into again.
In short, everything you do from the moment you announce your resignation to the moment you walk out the door on your last day should be conducted with the utmost professionalism so that you leave a positive, lasting impression.