L'auteur Christophe Chenavier France Membre Simple # 0000000023 enregistré le 14/10/2004 http://www.corwin.fr 57 ans CHENAVIER Christophe 80440 BOVES de la société Corwin Fiche personnelle
Implémention en VisualFoxPro de l'algorithme de cryptage RC4
# 0000000299
ajouté le 13/03/2006 07:35:51 et modifié le 13/03/2006
consulté 10076 fois
Niveau
initié
Il suffit d'un appel à la fonction RC4 pour crypter/décrypter :
cCrypte = RC4("ceci est un test","mot de passe")
cDecrypte = RC4(cCrypte,"mot de passe")
Code source :
*!* Objet : Implémention en VisualFoxPro de l'algorithme de cryptage RC4 *!* Auteur : C.Chenavier *!* Version : 1.00 - 12/03/2006 *!* RC4 signifie Rivest Cipher 4 *!* Il a été conçu en 1987 par Ron Rivest de RSA Security. *!* Attention, le nom "RC4" est une marque déposée. *!* Algorithme : http://en.wikipedia.org/wiki/RC4 *!* Les tests ont été réalisés grâce à l'article: *!* http://en.wikisource.org/wiki/RC4_test_vectors *!* *!* Exemples de test : *!* c = "0000000000000000" *!* a = RC4(STRCONV(c,16),STRCONV(c,16)) *!* Info(STRCONV(a,15)="DE188941A3375D3A") *!* *!* c = "0123456789abcdef" *!* a = RC4(STRCONV(c,16),STRCONV(c,16)) *!* Info(STRCONV(a,15)="75B7878099E0C596") *!* *!* c = "0000000000000000" *!* k = "0123456789abcdef" *!* a = RC4(STRCONV(c,16),STRCONV(k,16)) *!* Info(STRCONV(a,15)="7494C2E7104B0879") *!* *!* c = "00000000000000000000" *!* k = "ef012345" *!* a = RC4(STRCONV(c,16),STRCONV(k,16)) *!* Info(STRCONV(a,15)="D6A141A7EC3C38DFBD61") *!* *!* c = "123456789abcdef0123456789abcdef0123456789abcdef012345678" *!* k = "0123456789abcdef" *!* a = RC4(STRCONV(c,16),STRCONV(k,16)) *!* Info(STRCONV(a,15)="66A0949F8AF7D6891F7F832BA833C00C892EBE30143CE28740011ECF")
FUNCTION RC4 LPARAMETERS cTexte, cClef
LOCAL I, J, K, nLongClef, nInt, cResult LOCALARRAY aInt(256)
le 21/03/2006, EmanuelL a écrit : Christophe, est-ce qu'on peut utilisé cet algorithme librement étant donné qu'il est la propriété de la RSA?
le 21/03/2006, Christophe Chenavier a écrit : Il semble que les implémentations "non-officielles" sont légales pour autant qu'elles n'utilisent pas la marque RC4. Cf : http://fr.wikipedia.org/wiki/Arcfour
le 21/03/2006, EmanuelL a écrit : Merci Christophe. Publique avec Arcfour comme nom.
le 07/02/2009, abdoumaroc a écrit : merci Christophe
Christophe, est-ce qu'on peut utilisé cet algorithme librement étant donné qu'il est la propriété de la RSA?