"Sorry, that information is covered under my previous job's NDA." is a more direct, less bullshitty version of patio11's suggestion. It's also probably true.
Alternately: "My previous salary has no bearing on this discussion."
I would much prefer your to say "that doesn't matter." It's more honest than trying to invent a reason why I can't tell you, and it's true - it doesn't matter. The question is how much are my services, with my current skill set and experience, worth to you in your unique business. What my skill set of a few years ago was worth to somebody else in a different business is irrelevant. Apples and oranges.
Unless it's verifiably false. Which would be just as bad, and probably worse, than patio11's statement.
(Part of the design of patio11's tactic is that it isn't actually a lie: "I don't think it's polite to talk about stuff that feels like a private issue between my former employer and myself" is, itself, a fact.)
"My previous salary has no bearing on this discussion."
This is little better than saying "no". That's not merely somewhat abrupt and confrontational, but it also doesn't necessarily shut off the conversation. Instead, it could threaten to escalate the conversation. As your questioner, I can respond "but I think it does", or "tell me why you think so", or "yes, I tend to agree, but I have this form that my HR department makes me fill out and I need to put something in this blank". And then you have to keep talking. You don't want to keep talking.
People seem to be misunderstanding how diplomacy works. There's no requirement that a diplomatic answer be a direct answer to the question. Quite the contrary. The goal of the answer, in this case, is (a) to refuse to answer the question; (b) to hint, but absolutely not say out loud, that you understand what the questioner already knows, namely that the question was a deliberate, standard-issue negotiation tactic designed to place you at a disadvantage; (c) to politely refuse to overtly acknowledge point (b); (d) to draw an end to the conversation; (e) to end on a positive note and provide an opening to change the subject.
Alternately: "My previous salary has no bearing on this discussion."