Source Code



Encrypt and Decrypt

  • anonymous
  • Nov 02' 13
  • Delphi
  • 553
  • 21
  • United States

This source can be use for simple encryption and decryption for security program, it can be easy to create

 

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, dxGDIPlusClasses, ExtCtrls,ShellApi;

type
  TForm1 = class(TForm)
    eawal: TEdit;
    eenkripsi: TEdit;
    edekripsi: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    procedure eawalChange(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure Image1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation
{$R *.dfm}
function Encrypt(const S: String): String;
Var
I: byte;
t:string;
begin
for I := 1 to Length(S) do begin
t:=t+chr(ord(s[i])+64);
end;
result:=t+t;
end;

function Decrypt(const S: String): String;
var
I: byte;
t:string;
begin
for I := 1 to Length(S)div 2 do begin
t:=t+chr(ord(s[i])-64);
end;
result:=t;
end;

procedure TForm1.eawalChange(Sender: TObject);
begin
eenkripsi.Text := encrypt(eawal.Text);
edekripsi.Text := decrypt(eenkripsi.Text);
end;
end.

 


image for this program anda download sample here

 

encrypt decrypt

  • Tags :
comments powered by Disqus

Related Code

SQL Server 2000 installation fails with "...previous program installation..." error message

Default Time Zone

Form Validation Function

Spell Text and Hear It

Create Symphony With Midi Sound

Get IP Address

Splash Screen

Border Radius

Session for Keep Values

Solve (LSN) Error 9003 When Attach the Database SQL2000



Category