I had several small hasps (locks, buckles, ???)out in the garage, so it was a very quick and easy hack to challenge his garbage eating ability.
I set the can on its side, and laid the hasp on the front of the can. Half on the lid, the other half on the can (as it would be when closed and locked) and marked the holes with a sharpie.
I drilled 1/8 inch holes where marked and fastened the lock to the can with blind pop rivets. That is it.
If we are going to be gone long, we may put a small carabiner through the hole for added insurance.
You could spray paint the hardware, but it was fine without it.