Pergunta

i desenvolveu uma aplicação vb.net muito simples e eu preciso de uma maneira para cada usuário para verificar se eles pagaram por isso. eu gostaria o método mais simples possível. será uma inscrição off-line. Na verdade, estou procurando uma maneira que eu possa programar isso facilmente mim, e não estou interessado em soluções de terceira parte.

Foi útil?

Solução

Just ask for the name, and calculate a hash (such as SHA1 or MD5) for that name (maybe lowercase and strip whitespace first), prefixed with some secret text that is hardcoded in your program. If you want different keys for different versions, then also prefix the version number before calculating the hash. That hash will be your registration key (or, if you think it is too long: take the first characters of the hash).

Have the user enter both the name and the registration key, and store those in the program's configuration. Then recalculate the hash in exactly the same way whenever you need to validate it, and compare it to the stored key.

Outras dicas

You could store an encrypted string in the user's registry (e.g. his Full name). Decrypt that string at application start to check if the license is valid.

How secure do you want it to be? If you're looking for rock-solid piracy protection (if it even exists) you'll have to combine it with some sort of online registration/activation system. Or use a 3rd party solution as opted by Mitch Wheat.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top