Minifying code will obscure it, but obscurity is not security. All the code will be there on the client side and if someone can figure out how to activate it themselves, they will be able to use it to decrypt anything they like.
Doing it on the server will obscure the code even more (as it's no longer on the client), but once again that is not the same thing as being secure. If it's theoretically possible for the information to be decrypted on the client, it could be reverse engineered or brute forced.
If you want a truly secure option, you should use existing software designed by security experts. Anything you build yourself is unlikely to be truly secure. I've worked in software since 2007 and I would not trust myself to build something truly secure, as I haven't got expertise in building cryptographically secure systems.