Bonsoir ^^,
J'ai créé un composant pour accéder au service amazone et faire des requêtes. Amazone m'a fourni mes identifiants pour me reconnaître. Mon problème est que j'aimerai protéger ces identifiants.
Je pensais crypter mes identifiants pour les mettre dans un fichier ini et ensuite les decrypter dans mon application mais ...
J'utilise ce code pour crypter mes identifiants
Mais où stocker de nouveau mot de pass maintenant ... J'ai l'impression de tourner en rond ou de pas comprendre le mécanisme pour crypter quelque chose.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 var i: integer; Cipher: TDCP_rc4; KeyStr: string; begin KeyStr:= ''; if InputQuery('Passphrase','Enter passphrase',KeyStr) then // get the passphrase begin Cipher:= TDCP_rc4.Create(Self); Cipher.InitStr(KeyStr,TDCP_sha1); // initialize the cipher with a hash of the passphrase edtFinal.Text := Cipher.EncryptString(edtSource.Text); Cipher.Burn; Cipher.Free; end;
Merci de m'aider
Partager