Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

xxtea-delphi

XXTEA encryption algorithm library for Delphi/FreePascal.

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

XXTEA for Delphi

XXTEA logo

Introduction

XXTEA is a fast and secure encryption algorithm. This is a XXTEA library for Delphi.

It is different from the original XXTEA encryption algorithm. It encrypts and decrypts byte array instead of 32bit integer array, and the key is also the byte array.

Usage

pascal
program Example;

{$APPTYPE CONSOLE}

{$R *.res}

uses
  System.SysUtils,
  XXTEA,
  Base64;

var
  S, K, ED, DD: TBytes;
begin
    S := BytesOf(UTF8String('Hello World! 你好,中国!'));
    K := BytesOf('1234567890');
    ED := XXTEA.Encrypt(S, K);
    DD := XXTEA.Decrypt(ED, K);
    Writeln(Base64.Encode(ED));
    Readln;
end.