Mario35 Posted February 29, 2012 Share Posted February 29, 2012 Bonjour, Je suis en train de porter une application sous Android qui a été développé en C#. Et je tombe sur une tuile au niveau du cryptage/décryptage entre l'application et un webservice. Voici le boute de code en C# qui est utilisé: PasswordDeriveBytes pdb = new PasswordDeriveBytes(Password, new byte[] {0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76}); byte[] encryptedData = Encrypt(clearBytes, pdb.GetBytes(32), pdb.GetBytes(16)); Et je voudrais pouvoir crypter de la même façon sous Android. Si certains ont des pistes ou directement la solution, ça serai super. Mario. Link to comment Share on other sites More sharing options...
Sylvain-a Posted February 29, 2012 Share Posted February 29, 2012 Ca peut peut être t'aider :) : http://java.sun.com/...AES/AES_v1.html NB : premier lien sur google avec "java aes" ;) Link to comment Share on other sites More sharing options...
Mario35 Posted February 29, 2012 Author Share Posted February 29, 2012 Merci pour le lien, mais cela ne résout pas le problème. C'est un bon exemple pour du cryptage AES mais cela ne correspond pas à ma demande. Il y a un certain nombre d'exemple de cryptage AES pour android, mais ma demande est faire le même cryptage que le code C#. Utilisation d'un password, salt pour générer un vecteur iv... Mario Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.