#1 mORMot 1 » Error Compile SynDB Explorer Using Turbo Delphi » 2014-05-23 12:26:45

ebz
Replies: 2

I'm trying to compile SynDB Explorer Using Turbo Delphi [Explorer], but fail with error :

[Pascal Error] SynDBExplorerFrame.pas(756): E2251 Ambiguous overloaded call to 'UpperCase'
[Pascal Fatal Error] SynDBExplorerMain.pas(17): F2063 Could not compile used unit 'SynDBExplorerFrame.pas'

Already using the latest source http://synopse.info/fossil/info/3c704e4709 [2014-05-23]
ps. No problem using Delphi 7

#2 Re: Other components » Decrypt ciphertext from php mcrypt_encrypt using SynCrypto » 2014-01-02 11:57:28

ebz

PHP default is to use Zeros padding, as what the manual says

The key with which the data will be encrypted. If it's smaller than the required keysize, it is padded with '\0'.
The data that will be encrypted with the given cipher and mode. If the size of the data is not n * blocksize, the data will be padded with '\0'.
The returned crypttext can be larger than the size of the data that was given by data.

But I think I found the clue from the comment in the manual
http://www.php.net/manual/en/function.m … ncrypt.php
I'll try first

#3 Other components » Decrypt ciphertext from php mcrypt_encrypt using SynCrypto » 2014-01-02 02:29:51

ebz
Replies: 3

I'm using SynCrypto to decrypt data returned from PHP function and vice verse, but not successful. Can anyone help me what's the problem here? Here my script both PHP dan Delphi :

PHP Script for encrypt and decrypt

function encrypt($key,$data) { 
	$key = hash('SHA256', $key, true);
	$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);	
	$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);	
	return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $data, MCRYPT_MODE_ECB, $iv )));
} 

function decrypt($key,$data) { 
	$key = hash('SHA256', $key, true);
	$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);	
	$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);	
	return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($data), MCRYPT_MODE_ECB, $iv ));
} 

Delphi code:

function TForm1.Encrypt(const pasw, data: String): string;
var
  key : TSHA256Digest;
  ECB : TAESECB;
  iv  : TAESBlock;
begin
  HexToBin(Pointer(SHA256(pasw)),@key,32);
  FillChar(iv,16,0);
  ECB := TAESECB.Create(key,256,iv);
  try
    Result := Base64Encode(ECB.EncryptPKCS7(data));
  finally
    ECB.Free;
  end;
end;

function TForm1.Decrypt(const pasw, data: String): string;
var
  key : TSHA256Digest;
  ECB : TAESECB;
  iv  : TAESBlock;
  _dt : RawByteString;
begin
  _dt := Base64Decode(data);
  HexToBin(Pointer(SHA256(pasw)),@key,32);
  FillChar(iv,16,0);
  ECB := TAESECB.Create(key,256,iv);
  try
    Result := ECB.DecryptPKCS7(_dt);
  finally
    ECB.Free;
  end;  
end;

#4 mORMot 1 » Custom Header appearance in DrawGrid when using TSQLTableToGrid » 2013-06-03 08:01:37

ebz
Replies: 1

I've tried using TSQLTableToGrid and the result is really amazing, fast rendering, and ultra fast sorting ( I've compare to some other delphi -commercial/free popular sqlite db administrator applications) and using TSQLTableToGrid I've got the fastest result (really fast.. congratulations).

But I have some small uncomfortable visual appearance of the Header (using Delphi 7). As we now that XPmanifest (theme) doesn't have any effect to the header. Can you change the Header appearance, or add support when using theme? Just like these links :
- http://jedqc.blogspot.com/2006/06/theme … bgrid.html
- Or this http://delphi.about.com/od/vclusing/l/aa072203a.htm

And maybe smaller rectangle marker is better

#5 Re: Other components » oExport » 2013-05-27 06:40:14

ebz

Hi ab, can you add (integrate) new exporting engine (such what reddwarf said) that generate excel (xls or xlsx)? I've visit the oExport page, unfortunately it's now has different license.. I think it will great addition for this framework, as most client still prefer export as excel

#6 Re: mORMot 1 » REGEXP operator for SQLite3 » 2013-05-24 14:28:21

ebz

Thank you ab, this is very useful function
Before this, I just can find REGEXP function in commercial components (application)

#7 Re: mORMot 1 » FishFacts for mORMot » 2013-04-27 06:00:49

ebz

Great, more examples much better..
After tested, works nice without problem. I think jQuery isn't used in this examples, just pure javascript

#8 Re: PDF Engine » Convert Html File into PDF » 2013-03-31 10:36:09

ebz

Hi ab, the latest version THtmlViewer (version 11) already support unicode, using TntUnicodeControls and also support WideStrings
maybe you could update htm2pdf-free. It'll be useful tools
https://code.google.com/p/thtmlviewer/

#10 Re: mORMot 1 » How to check correctness of a custom unserialization of record? » 2013-03-01 01:41:40

ebz

Thank you Sha, your source code help me a lot when dealing with JSON with SynCommons and friends

#12 Re: mORMot 1 » Export some tables failed using SynDB Explorer » 2013-02-28 16:07:20

ebz

Oh great..
How about error in export the two tables ?

#13 mORMot 1 » Export some tables failed using SynDB Explorer » 2013-02-28 15:08:14

ebz
Replies: 4

I tried open dbdemos.db3 sample database from SQLite Expert Personal. Database was opened successfully, there are 21 tables, one (last) table fail to read because using unicode as a name (synDB explorer using string as table name).
Export 2 tables below also failed:

  • biolife : 'duplicate column name:Species'

  • custoly: 'near "/": syntax error

#14 Re: mORMot 1 » Need suggestion using mORMot in my project » 2013-02-21 13:35:37

ebz

Thank you ab,
I know that i'll loose many features, just the beginning, thus I hope that after this project I can use the power of full client-server project using mORMot

#15 mORMot 1 » Need suggestion using mORMot in my project » 2013-02-21 02:10:33

ebz
Replies: 2

Hi Arnaud,
I really want using mORMot or part of this framework for my project.
After read some pages from SAD documentation, search through this forum I still unsure which class/component is suitable for my project.

I want to create client application using Delphi and server using PHP+MySQL, because the server is just shared hosting. The PHP (server) part is just querying (CRUD) the database based on parameter send by Client (delphi) and return the result to client as JSON. Client access server through domain name not IP address and just send POST/GET request. There are just 3-10 clients

I see that mORMot has amazing class when dealing with JSON (maybe the fastest and stable), reporting engine (synPDF), always update and another great classing system. Can you give suggestion about, so I can focus to learn using mORMot for such project?

#16 Re: mORMot 1 » Decode JSON Array of multiple object » 2013-02-17 15:43:03

ebz

Thank you ab..
I'll try using TObjectList, I always follow this fw development and always amaze with it
Super fast, not depend on DB unit or another new features in D2007.. XE, XE2... (so I can work using my old Delphi 7), unicode support, plus the documentation is 'wow'..  And another what I wonder is that almost all of this framework was develop by single person..

Even sometimes I can't figure yet or find the way to solve my problem using mORMot
(Usually I just coding using procedural type)

#18 mORMot 1 » Decode JSON Array of multiple object » 2013-02-15 07:20:05

ebz
Replies: 4

I'm new using this framework, how to decode array of multiple json? I've tried using such code:

 JSONDecode(jsonText,['x','w','d'],hasil,true);

But I only get the last object value

Example JSON is

[{
		"x" : 2546,
		"w" : "kibik",
		"d" : "<b>kubik<\/b>"
	}, {
		"x" : 14564,
		"w" : "kubik<sup>1<\/sup>",
		"d" : "data two"
	}, {
		"x" : 100,
		"w" : "kubik<sup>2<\/sup>",
		"d" : "string three"
	}
]

Board footer

Powered by FluxBB