Afficher mot de passe en phonetique

Résolu
desbordesa Messages postés 4 Date d'inscription mardi 29 juillet 2008 Statut Membre Dernière intervention 4 août 2008 - 29 juil. 2008 à 20:33
desbordesa Messages postés 4 Date d'inscription mardi 29 juillet 2008 Statut Membre Dernière intervention 4 août 2008 - 4 août 2008 à 15:40
Bonjour,

Je suis novice (total) donc tt mes excuses. Voilà je cherche la possibilité d'envoyer par mail via un formulaire le login d'un utilisateur (user/password) et d'afficher également le mot de passe en phonetique du genre :

user : arnaud.desbordes

password : z B42ad

Phonetic : zulu - BRAVO - quatre - deux - alpha - december

Merci encore du coup de main à tous

Arnaud
A voir également:

5 réponses

jreaux62 Messages postés 195 Date d'inscription vendredi 13 juin 2008 Statut Membre Dernière intervention 24 octobre 2011 32
30 juil. 2008 à 11:09
Bonjour,
ce que tu appelle "phonetique" est en fait "L'alphabet international" utilisé notamment en radiocommuniocation.
Tu peux le trouver ici :
http://www.aviationpassion.org/radio.html

Si tu veux vraiment l'utiliser, il te faut :
1- une table de correspondance, soit dans une BD, soit un array() :
(minuscules)
a --> alpha
...
(majuscules)
A --> ALPHA
...
(chiffres)
1 --> un (ou unité)
2 --> deux
...

2- décomposer le nom de passe en ses éléments
3- remplacer chaque element par sa correspondance
4- recomposer le mots (avec un espace entre chaque element)
3
jreaux62 Messages postés 195 Date d'inscription vendredi 13 juin 2008 Statut Membre Dernière intervention 24 octobre 2011 32
31 juil. 2008 à 23:45
Rien que pour toi :

<%
// encodage
function encodepwd(pwd)
 table1 = array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","Z","Y","Z")
 table2 = array("zero","unite","deux","trois","quatre","cinq","six","sept","huit","neuf","alpha","bravo","charlie","delta","echo","foxtrot","golf","hotel","india","juliet","kilo","lima","mike","november","oscar","papa","quebec","romeo","sierra","tango","uniform","victor","whisky","x-ray","yankee","zulu","ALPHA","BRAVO","CHARLIE","DELTA","ECHO","FOXTROT","GOLF","HOTEL","INDIA","JULIET","KILO","LIMA","MIKE","NOVEMBER","OSCAR","PAPA","QUEBEC","ROMEO","SIERRA","TANGO","UNIFORM","VICTOR","WHISKY","X-RAY","YANKEE","ZULU")
 pwdcode = ""
 for i=0 to (len(pwd)-1) step 1
  for j=0 to ubound(table1) step 1
   if (table1(j)=mid(pwd,i+1,1)) then
    pwdcode = pwdcode & table2(j)
    if (i<>len(pwd)-1) then
     pwdcode = pwdcode & "_"
    end if
   end if
  next
 next
 encodepwd = pwdcode
end function
%>


<%
// decodage
function decodepwd(pwdcode)
 table1 = array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","Z","Y","Z")
 table2 = array("zero","unite","deux","trois","quatre","cinq","six","sept","huit","neuf","alpha","bravo","charlie","delta","echo","foxtrot","golf","hotel","india","juliet","kilo","lima","mike","november","oscar","papa","quebec","romeo","sierra","tango","uniform","victor","whisky","x-ray","yankee","zulu","ALPHA","BRAVO","CHARLIE","DELTA","ECHO","FOXTROT","GOLF","HOTEL","INDIA","JULIET","KILO","LIMA","MIKE","NOVEMBER","OSCAR","PAPA","QUEBEC","ROMEO","SIERRA","TANGO","UNIFORM","VICTOR","WHISKY","X-RAY","YANKEE","ZULU")
 tablepwd = split(pwdcode,"_")
 pwd = ""
 for i=0 to ubound(tablepwd) step 1
  for j=0 to ubound(table2) step 1
   if (table2(j)=tablepwd(i)) then
    pwd = pwd & table1(j)
   end if
  next
 next
 decodepwd = pwd
end function
%>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html charset=windows-1252">
<title>exemple</title>
</head>



Exemple :

<%
pwd = "aEf21PwS3u"
 response.write "pwd : " & pwd &"
"
pwdcode = encodepwd(pwd)
 response.write "pwdcode : " & pwdcode &"
"
pwddecode = decodepwd(pwdcode)
 response.write "pwddecode : " & pwddecode &"
"
%>



</html>

PS : je l'ai fait aussi en PHP ...
3
desbordesa Messages postés 4 Date d'inscription mardi 29 juillet 2008 Statut Membre Dernière intervention 4 août 2008
30 juil. 2008 à 15:36
Bonjour jreaux62

Merci pour tes conseils!
Je debute totale (je commence une formation à l'automne).

Est ce que tu as plus de détails ou exemple svp j'aimerai utiliser un array et non une BD j'ai quand meme cree le tableau comme indiquer :)

Merci encore pour ton aide!

Arnaud
0
jreaux62 Messages postés 195 Date d'inscription vendredi 13 juin 2008 Statut Membre Dernière intervention 24 octobre 2011 32
31 juil. 2008 à 20:32
Si j'ai le temps, j'ecrirai un script ... pour le plaisir ...

En attendant : cherche de ton coté, ca fait du bien aux neurones !

Jerome
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
desbordesa Messages postés 4 Date d'inscription mardi 29 juillet 2008 Statut Membre Dernière intervention 4 août 2008
4 août 2008 à 15:40
Bonjour Jerome,

Désolé pour ma reponse tardive 'petit accident' bref j'ai integré ton script et j'ai juste à te dire MERCI pour ton aide
vivement que je puisse comencer en automne.

Merci encore

Arnaud
0
Rejoignez-nous