Hi black-roses,
Absolutely don't "beat yourself up" about your past

It sounds like you're "street smarting" yourself up REALLY well now!!!
There are people out there aged 25........27.........30...........35.........40.............who are still learning some of the lessons you've learnt, not to discredit them, but to credit you!!

And it isn't always people natural instincts to assume that there are other people who have real bad intentions.........that something you do innocently, with good intentions might be turned against you............so it's not necessarily been your fault, but at least you're more focused on protecting yourself against that sort of stuff now, which is
great.
And
to be fair to yourself in respect of the male friend.........why
shouldn't you have expected a friend to be,
just that, a friend, and
not to hurt you/take advantage of you??!!!
I am sorry you found yourself in that position

And if you need any support with that..........we're here for you
But I've still got to ultimately
really congratulate you on your progress in picking up those "street smarts". I know it must have been really difficult if you hadn't had that support network to help you pick some of them up sooner.........but you're absolutely on the right track, keep up the good work!!!
And a bit of Googling or checking out online other people's experiences might help too along the way
Alison