dogs can smell anything, there is no way to truly beat a dog's nose. however...... you can get it by them if it was stuck into the peanut butter within 30 seconds of the dog passing by it, and there was zero residue on either you or the outside of the peanut butter jar (which I doubt many of us could do unless we had just gotten out of the shower.)
but the dog would go nuts trying to eat the peanut butter, defeating the purpose of using it.