FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
Serialisation
Serialisation
Débuté par romuald besset, 07 aoû. 2003 18:05 - 1 réponse
Connectez-vous…
romuald besset
#1
Posté le 07 août 2003 - 18:05
HI
Hi need to create a # serial builder.
serial is build from a 100 chars string.
I need to obtain a 7 chars max #serial.
wd exaples show how to crypt bu not how to obtain a small key...
Of course a simply reverse of two consecutive chars must give a different key !!!
A big big thank to how will be able to help
http://rbesset.net
rbesset.net : french unofficial windev gate
Signaler
0
0
Guenter Predl
#2
Posté le 07 août 2003 - 22:41
Hi Romuald, I hope, I am right in that you want to convert a customers name into a unique serial number? If so, do the following
X is string = "Software Buyers & Pinchers Ltd."
Sum is long int = 0
FOR I = 1 TO LENGTH(X)
Sum = Sum + Asc(Middle(X, I, 1))
END
You'd end up with a unique number stored in Sum but there's quite a lot of names fitting that number. So we'd have to make our number a little more 'unique'. Just an example:
Sum = Sum + Asc(Middle(X, I, 1))*I
This way we bind position and value. Even large text-fields would boil down to relatively small Sums (=serial numbers). However, in order to prevent finding out, you should allow a certain minimum length of X only. Short strings will enable a hacker to guess the number more easily. Of course, there are a lot of ways to improve on the algorithm, f.i. Sum = Sum + Asc(Middle(X, I, 1))*I + I\2 (fyi: the '\' is right, this's an integer division in WD like in many BASICs)
Maybe, you think 'Asc' alone is too simple. Make it a binary exclusive OR with a random text exactly as long as the longest string could be.
Every algorithm for calculating a serial number can be broken, it's just a question of the effort put into breaking. So, your algorithm will depend on the price of the program and other influencing facts ..
We did go into this and found out that WinDev is much more secure than any compiled language. The source is in the delivered exe, but it's p-code there, not machine language which could be disassembled easily.
Best regards,
Guenter
HI
Hi need to create a # serial builder.
serial is build from a 100 chars string.
I need to obtain a 7 chars max #serial.
wd exaples show how to crypt bu not how to obtain a small key...
Of course a simply reverse of two consecutive chars must give a different key !!!
A big big thank to how will be able to help
http://rbesset.net
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte