Especially at around college age, there is a particular pattern of behaviour I have seen in young men that is not a healthy one for the women around them. The actions of the young man you describe fit into that pattern.
The primary aspect of this behaviour is that they push you to do specific things that people do when they are in a close relationship, before you are in a close relationship. They often use guilt or transactions (I went first now you have to) to get you to do these things. Telling dark secrets is a classic example of something they push you to do. They may also push you to be more sexual than you want. A guy I knew in college, who sounds very similar to your friend, pushed women to let him take pictures they weren't comfortable with. He had asked me repeatedly for secrets, and to tell him sadnesses in my past, when we weren't dating. That was his pattern. Perhaps had I got into telling him such things I would also be on the list of people who let him take pictures and regretted it.
In a real relationship you want to know things about your partner: when did you learn to ski, what's your favourite pie, what do your sisters call you when they're teasing you, why did you break up with that boy when you were 15, do you want to learn to sail someday, can you sing, where do you want to live after college, are you a cat person or a dog person, everything! But you learn these things by spending time together, telling each other stories, showing each other family pictures, being at each other's family events, planning a future together. Not by being texted late at night and having them demanded of you.
In a real relationship, you're important. You need to sleep, to study, to do your homework. You need to feel comfortable and happy and relaxed. Manipulating you into revealing things you'd rather not reveal, whether that's telling secrets or taking your shirt off, is not what real relationships are about. You do these things joyfully because you want to, not because of a late-night text prompt.
You say the "friend" is being cold now. That could be part of trying to get you to come and offer what was asked for in an attempt to get him back. Or it could be a genuine, slightly sulky, reaction to learning that you don't want to reveal secrets on demand. Either way, that's fine. If the two of you are building a real relationship, it will have times you are together a lot and times you focus on other things: family, schoolwork, other friends, your health.
If you end up trusting this person and your "dark secrets" or "complicated past" become relevant, you'll tell him. Say the two of you are talking about sex, you might mention a bad sexual experience in your past. Or talking about living together and getting a pet, you might mention the loss of a pet and how badly it hurt you. Or if your secrets are something else, like that your brother spent time in jail, you will mention them when they are relevant. Say someone asks if you've ever been to a particular town. You might lie and say no. You might say yes, but it was a family thing so we never really did any sightseeing or anything. Or you might say you went there pretty regularly while your brother was in jail there, if you trust the person and feel like saying that. See how different that is than someone saying "tell me a dark secret" and you blurting out a fact with no context or reason other than being asked?
Your friend may not be like the young men I remember from university, or remember my daughter dealing with in high school. But he's doing what they did: pushing people while they are uncomfortable, suggesting that irritation or discomfort are not ok reactions, flipping scope from them and you to "men" as in "why do men always have to" when you want something from them, and generally not saying or doing things that say "you're super important, you matter to me, I want you to be happy, I really enjoy spending time with you, you're amazing." Why not? Isn't that what friends and boyfriends do?
So, how do you tell him you don't trust him enough to trot out your secrets, sadnesses, and complicated past on demand because he's curious? Don't worry too much about phrasing it just right. If he's asking because he wants to know everything about you, keeping some things to yourself isn't going to damage the relationship. And if he's asking as part of a pattern of manipulative and unhealthy behaviour, you're not risking anything by shutting that down. I would suggest something like:
I don't see any point in telling random secrets just because they're secrets. Especially not dark ones. We'll learn more about each other as we spend time together. Is there something particular you're curious about?
This lets him ask things like whether you have past relationships and how serious they were, which is the sort of thing partners often want to know, without putting you on the spot to "perform your trauma" by telling him about your past for no reason other than he feels like making you do so.
Or you could go with humour. I have had great success with this, which is not original to me, but I have used it out loud on purpose:
Someone: oh, [working there, living there, knowing that person] you must have some really juicy stories to tell!
Me: well, [pause, maybe even look around], can you keep a secret?
Someone: oh yes, absolutely!
Me: So can I.
Ba-dum-dum. It works, though.