Jump to content
YOUR-AD-HERE
HOSTING
TOOLS

Locked Cifrado Autoclave By AX


Expermicid

Recommended Posts

[lenguaje=delphi]Function Autoclave(A : String; B : String; C : Integer) : String;

{'================================================================='}

{' AX: Segundo cifrado de Vigenère '}

{' Uso: Autoclave('Texto', 'Clave', 1/2) '}

{' Cifrar (1) | Descifrar (2) '}

{'================================================================='}

 

Var D : LongInt;

Var E : String;

Var F : Integer;

Var G : Integer;

Var H : String;

Var I : String;

Var K : Integer;

Var L : Integer;

Const T = 'ABCDEFGHIJKLMNÑOPQRSTUVWXYZ';

Begin

If (Length(A) = 0) Or (Length(B) = 0) Then Exit;

If Not (C = 1) Then If Not (C = 2) Then Exit;

L := 1;

 

A := StringReplace(UpperCase(Trim(A)), ' ', '', [rfReplaceAll]);

B := StringReplace(UpperCase(Trim(B)), ' ', '', [rfReplaceAll]);

 

If Length(B) < Length(A) Then For D := 1 To Length(A) - Length(B) Do E := E + Copy(A, D, 1);

 

If (C = 2) Then Begin

For D := 1 To Length(A) Do Begin

F := Pos(Copy(A, D, 1), T) - 1;

G := Pos(Copy(B, L, 1), T) - 1;

 

If (F - G) < 0 Then K := 27 + (F - G) + 1 Else K := (F - G) Mod 27 + 1;

 

I := I + Copy(T, Pos(Copy(T, K, 1), T), 1);

H := H + Copy(T, Pos(Copy(T, K, 1), T), 1);

If Length(B) = Length(I) Then Begin B := I; I := ''; L := 0; end;

L := L + 1;

end;

end Else Begin

For D := 1 To Length(A) Do Begin

F := Pos(Copy(A, D, 1), T) - 1;

G := Pos(Copy(B + E, D, 1), T) - 1;

H := H + Copy(T, Pos(Copy(T, (F + G) Mod 27 + 1, 1), T), 1);

end;

end;

 

Autoclave := H;

End;[/lenguaje]

 

Autor: AX

Fuente: PitbullSecurity

 

Saludos

Edited by Expermicid
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.