wagnerlimalopes
asked on
Crypto Letters and Numbers
hello
I would like to know how to change the encryption algorithm below for it to return only letters and numbers?
thanks
Wagner
I would like to know how to change the encryption algorithm below for it to return only letters and numbers?
function EncryptDecrypt(InpStr, PassPhrase: string; Salt: Integer): string;
var
iIndex: Integer;
pIndex: Integer;
begin
pIndex := 1;
for iIndex := 1 to Length(InpStr) do
begin
InpStr[iIndex] := Chr(Salt XOR Ord(PassPhrase[pIndex]) XOR Ord(InpStr[iIndex]));
Inc(Salt);
Inc(pIndex);
if (pIndex > Length(PassPhrase)) then
pIndex := 1;
end;
Result := InpStr;
end;
thanks
Wagner
If you change encryption, you will have to change decryption, too!!!
ASKER
even having to separate the encryption and decryption codes, what is the solution?
wagner
wagner
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.