It is possinle to create a security code for HC05 module?

-I bought the HC05 module, I want to ask if it is possible to write a code in arduino ide to allow the user to enter a code before entering the main code?If possible any help on how it could be done?
-It is possible to do security code using serial communication such as when using the computer serial monitor (ide)?

In AT mode the HC-05 allows to toggle some of its pins, afaik (consult the datasheet).
So it would be possible to to start arduino operation based on the specific level at the HC-05 pin. The security code will be the HC-05 pairing code then, for example.

A arduino code, that tell the user to enter a password?if password correct led turn on and if password incorrect turn off and serial print “wrong password”.
-Could this code be used to do this?
http://forum.arduino.cc/index.php/topic,43002.0.html