Olá Joel
Existem muitas maneiras de esfolar um gato, ja diz o ditado....
Dependendo do nivel de segurança que queiras para essa password, podes ir por varios meios.
1 - Facil - Usar uma password hardcoded no codigo, ou seja cada distrinuiçao teria a sua propia password.
Vantagens - Facil de implementar, basta uma textbox e comparar a string com a password...
Desvantagens - a principal é ter de mudar a password no codigo para cada utilizador, é segura q.b.
2- Média - Utilizar um ficheiro para guardar a password e o user name, no inicio da aplicaçao ler esses valores e comparar com o que o utilizador entrou, para alterar, bastaria guardar e substituir o ficheiro.
Vantagens - Podes ter uma password base para 1º iniciaçao da aplicaçao e depois o utilizador defenir uma nova.
Desvantagens - Com um explorador de ficheiro, consegue-se ver o conteudo do ficheiro onde estao guardados os valores.
3 - Dificil -parecida com a numero 2 mas em vez de guardares os valores simples, codificas usando por exemplo o MD5, com uma chave fixa ou variavel, e no arranque descodificas usando essa mesma chave.
Vantagens - Como no nº2, mas desta vez, muito mais segura.
Desvantagens - apenas a dificuldade normal de implementaçao.
Espero ter ajudado
In English
HI Joel
There are several ways to skin a cat, as they say...
Depending of how secure you want that password to be, yu can choose several ways...
1-Easy - Use a harcoded password, being that each distribution would have its own password.
Advantages - Easy to implement, just use a textbox and compare the entered string with the hardcoded password.
Disadvantages - The main one is to have to change the password in the code itself for each new user...The password is safe enough.
2- Medium - Use a file containing the password and the username, in app start read those from the file and compare with the entered ones, to alter them would just be overwriting the file.
Advantages - You can use a base user and password set for first run, and then have the user alter them.
Disadvantages - With a file explorer, we can see the file and it's contents, wich makes its not very safe.
3 - Hard - Just like Nº2, but with encoding, i.e. with MD5, either with a fixer decoder key, or a variable one. on appstart you read and decode the values from the file.
Advantages - Like Nº2, but MUCH safer.
Disadvantages - Just the normal dificulties of implement.
Hope to have helped you