Unless they have some reason to fear you, they'll just take it if they feel like it. Worse, if you're not Canadian they might send you back where you came from. And when they do it, they won't even tell you their names. What are you gonna do about it?
As a Canadian? They have to let you enter, but I believe they’ll seize it?
As anyone else? “Your request to enter Canada has been denied”
In 2014, I (an American) refused to give my passwords to Canada and they denied me entry and never gave me back my phone or laptop.
How can USA deny you entry to your home country? Where are they going to send you?