I want to store some hashed data in my contract. Which is better, hashing on the backend(contract) or the frontend. Also, is there any security consideration to look at when doing this? Thank you.
It's a hashing function so in theory it can't be reversed. Therefore the possible security concerns are:
1) Someone guessing the inputs by trying to generate the same hash output
2) Someone using the same hash string for other possible malicious uses
If you generate it in the smart contract everyone can see the input values. So it depends on your needs which approach you should take.