Expermicid Posted February 2, 2013 Share Posted February 2, 2013 (edited) Encriptar: [lenguaje=delphi]Function CifSustMetal(Texto: string): string; const Letr: array [0..255] of byte = ( $0,$49,$2,$EB,$CA,$5,$B0,$43,$C7,$6E,$4,$67,$C,$B3,$7F,$F,$10, $73,$12,$1,$74,$7B,$16,$9C,$AF,$19,$1A,$1B,$1C,$F2,$B1,$1F,$D4, $56,$71,$3,$60,$FE,$26,$27,$D5,$78,$4A,$5D,$13,$2D,$2E,$2F,$30, $31,$32,$75,$28,$35,$36,$FA,$38,$39,$3A,$3B,$3C,$F0,$90,$6,$CC, $CE,$7A,$98,$44,$45,$9F,$47,$48,$A3,$55,$6D,$4C,$85,$D3,$4F,$50, $95,$8D,$53,$42,$CB,$C9,$57,$58,$E2,$5A,$E9,$C0,$D9,$5E,$81,$9A, $80,$62,$3D,$B2,$65,$A,$C2,$68,$4B,$B9,$6B,$6C,$24,$11,$A5,$BB, $A8,$8A,$14,$5C,$63,$76,$83,$BD,$1E,$9D,$46,$7C,$7D,$7E,$79,$40, $5B,$82,$D6,$84,$23,$86,$E1,$88,$89,$AC,$8B,$34,$B5,$8E,$8F,$B8, $91,$A1,$DD,$A0,$59,$D,$3E,$93,$99,$22,$FC,$B,$DA,$9E,$6A,$25,$F9, $70,$A9,$A4,$F6,$2C,$69,$51,$66,$15,$FD,$72,$AD,$6F,$64,$E3,$77, $97,$8C,$B4,$EE,$B6,$B7,$E4,$37,$5F,$D7,$BC,$29,$C3,$BF,$52,$C1, $EC,$E5,$A6,$C5,$C6,$18,$4D,$AB,$C4,$2B,$87,$CD,$94,$CF,$D0,$D1, $D2,$BA,$17,$61,$E0,$41,$D8,$A2,$BE,$DB,$7,$E,$DE,$DF,$9B,$9,$21, $A7,$1D,$54,$E6,$E7,$E8,$C8,$EA,$DC,$20,$ED,$AE,$EF,$AA,$F1,$F7, $F3,$F4,$3F,$33,$F5,$F8,$2A,$92,$4E,$8,$96,$FB,$FF); var i: integer; begin SetLength(Result, Length(Texto)); for i:= 1 to Length(Texto) do Texto:= chr(Letr[ord(Texto)]); Result:= Texto; end;[/lenguaje] Desencriptar: [lenguaje=delphi]Function DescifSustMetal (Texto: string): string; const Letr: array [0..255] of byte = ( $0,$49,$2,$EB,$CA,$5,$B0,$43,$C7,$6E,$4,$67,$C,$B3,$7F,$F,$10, $73,$12,$1,$74,$7B,$16,$9C,$AF,$19,$1A,$1B,$1C,$F2,$B1,$1F,$D4, $56,$71,$3,$60,$FE,$26,$27,$D5,$78,$4A,$5D,$13,$2D,$2E,$2F,$30, $31,$32,$75,$28,$35,$36,$FA,$38,$39,$3A,$3B,$3C,$F0,$90,$6,$CC, $CE,$7A,$98,$44,$45,$9F,$47,$48,$A3,$55,$6D,$4C,$85,$D3,$4F,$50, $95,$8D,$53,$42,$CB,$C9,$57,$58,$E2,$5A,$E9,$C0,$D9,$5E,$81,$9A, $80,$62,$3D,$B2,$65,$A,$C2,$68,$4B,$B9,$6B,$6C,$24,$11,$A5,$BB, $A8,$8A,$14,$5C,$63,$76,$83,$BD,$1E,$9D,$46,$7C,$7D,$7E,$79,$40, $5B,$82,$D6,$84,$23,$86,$E1,$88,$89,$AC,$8B,$34,$B5,$8E,$8F,$B8, $91,$A1,$DD,$A0,$59,$D,$3E,$93,$99,$22,$FC,$B,$DA,$9E,$6A,$25, $F9,$70,$A9,$A4,$F6,$2C,$69,$51,$66,$15,$FD,$72,$AD,$6F,$64,$E3, $77,$97,$8C,$B4,$EE,$B6,$B7,$E4,$37,$5F,$D7,$BC,$29,$C3,$BF,$52, $C1,$EC,$E5,$A6,$C5,$C6,$18,$4D,$AB,$C4,$2B,$87,$CD,$94,$CF,$D0, $D1,$D2,$BA,$17,$61,$E0,$41,$D8,$A2,$BE,$DB,$7,$E,$DE,$DF,$9B,$9, $21,$A7,$1D,$54,$E6,$E7,$E8,$C8,$EA,$DC,$20,$ED,$AE,$EF,$AA,$F1, $F7,$F3,$F4,$3F,$33,$F5,$F8,$2A,$92,$4E,$8,$96,$FB,$FF); var i, j: integer; begin SetLength(Result, Length(Texto)); for i:= 1 to Length(Texto) do begin for j:= 0 to 255 do begin if Texto = chr(Letr[j]) then begin Texto:= chr(j); break; end; end; end; Result:= Texto; end;[/lenguaje] Autor: Metal_Kingdom Saludos Edited February 16, 2014 by Expermicid Link to comment Share on other sites More sharing options...
Recommended Posts