Yes old encryption methods worked in a similar way, for example ROT13. The security of these methods ultimately relies on keeping the encryption process a secret, i.e. security through obscurity. These days we know that's not good.
Modern encryption methods are publicly known and thus do not have that vulnerability. The security of modern encryption algorithms rely on keeping some sort of key a secret instead of the actual encryption process.