Works on both routers and switches.
enable secret password is encrypted by default. enable password is not. For this reason, recommended practice is that you never use the enable password. Use only the enable secret password in a router configuration.
You cannot set both enable secret and enable password to the same password. Doing so defeats the use of encryption.