Mugal28,
Why would you feel any more secure in a hotel as opposed to a hostel? The only thing I can imagine is that you think you don't have a private room in a hostel. This subject has been covered many times on this bulletin board, but just to reiterate, a hostel in Spain, is just a smaller, cheaper, family run hotel. You have your own room, with your own key, and in most cases, and always if requested ahead of time, your own shower.
I've found in the hostels I've stayed at the people who run them to be security conscience almost to the point of hysteria. In a hostel, there are at least two doors between yourself and the outside. You are given a key to your own room and the main door, or you buzz to be let in to the main door and pass a reception area.
By and large, the security problem starts after you leave your hostel/hotel. That's another story. But don't worry about staying at a hostel, just enjoy your trip.
_________________________
"I swear -by my life and my love of it -that I will never live for the sake of another man, nor ask another man to live for mine."