• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

Delphi [Cifrado] ROTn Metal

Status
Not open for further replies.

Expermicid

Leech
User
Joined
Oct 23, 2011
Messages
285
Reputation
0
Reaction score
255
Points
63
Credits
0
‎13 Years of Service‎
95%
Hola a todos.

Aqui les dejo este algoritmo.

Autor: Metal_Kingdom

Encriptar:

[lenguaje=delphi]function EncROTn(Cadena: string; NumRot: integer): string;

var

i: integer;

begin

for i:= 1 to length(Cadena) do

Result:= Result + chr(ord(Cadena) + NumRot mod 256);


end;[/lenguaje]


 


Desencriptar:

 


[lenguaje=delphi]function DecROTn(Cadena: string; NumRot: integer): string;



var



i: integer;



begin



for i:= 1 to length(Cadena) do



Result:= Result + chr(ord(Cadena
) + (256 - NumRot) mod 256);


end;[/lenguaje]


 


Ejemplo de cada una:

 


[lenguaje=delphi]Showmessage(EncROTn('putón', 12)); //muestra un msgbox con la string 'putón' encriptada con rot12 = |€ÿz



Showmessage(DecROTn('|€ÿz', 12)); //muestra un msgbox con la string '|€ÿz' desencriptada con rot12 = putón[/lenguaje]


 


Creditos: Slek


 


Saludos


 
Last edited by a moderator:
Status
Not open for further replies.
Back
Top