That depends on whether your communication channel and peripheral devices are secure. Otherwise you might want to use encryption techniques for authentication and/or communication.
In the real world, passwords are not stored on computers; they are stored as a hash. E.g when you login on a server, the hash of the password that was received is calculated and compared with the stored hash.
When the central connects to the peripheral you can test for the central address and if its not the correct address, you can block the relay functionality.