Re: [MSEide-MSEgui-talk] TMSEFileStream: how can me use a singel instance of the steram for creating+filling(via HTTP) a file then rereading the file(to compute its SHA256 digest) ?

2012-07-16 Thread Ivanko B
Smth like : hash:= ''; for i:= 1 to length(s1) do begin hash:= hash + mselowercase(inttohex(longword(s1[i]),2)); end; PS: the need in "mselowercase" looks strange. Is it a digest rule ? 2012/7/17, IvankoB : > Martin Schreiber > писал(а) в своём письме Tue, 17 Jul 2012 09:51:49 +0500: >> To a

Re: [MSEide-MSEgui-talk] TMSEFileStream: how can me use a singel instance of the steram for creating+filling(via HTTP) a file then rereading the file(to compute its SHA256 digest) ?

2012-07-16 Thread IvankoB
Martin Schreiber писал(а) в своём письме Tue, 17 Jul 2012 09:51:49 +0500: > To answer the question in subject: > " > := tmsefilestream.create('filename',fm_create); > .cryptohandler:= ; > //it could be a chain example: > //<-tbase64handler<-tasymciphercryptohandler<-tzstreamhandler<-tdigesthandl

Re: [MSEide-MSEgui-talk] Python indentations in ObjPas :)

2012-07-16 Thread Martin Schreiber
On Monday 16 July 2012 22:59:33 Marcos Douglas wrote: > Indentation is not everything when it comes to ease of reading. > The names is many important too. > > See your example above. The variable names are: > int1,int2,int3: sizeint; > lint1,lint2: int64; > > Don't you think is better use "size

Re: [MSEide-MSEgui-talk] Wishlist: editor with tabs visible

2012-07-16 Thread Martin Schreiber
On Monday 16 July 2012 23:01:48 Graeme Geldenhuys wrote: > Hi Martin, > > Is there any chance you could enhance the editor in MSEide to show the > start of a TAB character in the source code. See the attached > screenshot for an example. > IIRC I once had TAB display code in MSEgui already. I'll ha

Re: [MSEide-MSEgui-talk] Python indentations in ObjPas :)

2012-07-16 Thread Martin Schreiber
On Monday 16 July 2012 22:41:15 Graeme Geldenhuys wrote: > Hi, > > > Surprisingly easy to read & lower vert size of code: > > Kind kind-of agree with the "surprisingly easy to read bit", but not > enough for me to switch. I'm still staying with my faithful Borland > Delphi coding style, but I did m

Re: [MSEide-MSEgui-talk] TMSEFileStream: how can me use a singel instance of the steram for creating+filling(via HTTP) a file then rereading the file(to compute its SHA256 digest) ?

2012-07-16 Thread Martin Schreiber
On Monday 16 July 2012 21:18:15 Ivanko B wrote: > Then more descriptive name like "docrypto", "refreshcrypto" etc ? > Why? tmsefilestream.cryptohandler tracks the read stream data in openmode fm_read or the written stream data in openmode fm_write, fm_create. In order to read all the data of the f

Re: [MSEide-MSEgui-talk] Wishlist: editor with tabs visible

2012-07-16 Thread Sieghard
Hallo Graeme, Du schriebst am Mon, 16 Jul 2012 22:01:48 +0100: > Recently I switched my coding style to use TAB (equals 4 spaces in > width) character indentation, instead of the standard 2-space IF there's no chance ever that you might have to edit your code in some other editor, that might do.

Re: [MSEide-MSEgui-talk] Python indentations in ObjPas :)

2012-07-16 Thread Marcos Douglas
On Mon, Jul 16, 2012 at 2:24 PM, Ivanko B wrote: > Surprisingly easy to read & lower vert size of code: > > //-- > > function tmsefilestream.readdatastring: string; > var > int1,int2,int3: sizeint; > lint1,lint2: int64; > begin > if fcryptohandler = nil then begin > set

[MSEide-MSEgui-talk] Wishlist: editor with tabs visible

2012-07-16 Thread Graeme Geldenhuys
Hi Martin, Is there any chance you could enhance the editor in MSEide to show the start of a TAB character in the source code. See the attached screenshot for an example. Recently I switched my coding style to use TAB (equals 4 spaces in width) character indentation, instead of the standard 2-spa

Re: [MSEide-MSEgui-talk] Python indentations in ObjPas :)

2012-07-16 Thread Ivanko B
I switched from 2-space indentation to 1-tab (equal to 4 spaces) indentation. The bigger indentation makes it much easier for me to match blocks of code without the need of fancy editor magic (fine vertical lines, or auto-generated code indentation etc etc). The monitor at my work i

Re: [MSEide-MSEgui-talk] Python indentations in ObjPas :)

2012-07-16 Thread Graeme Geldenhuys
Hi, > Surprisingly easy to read & lower vert size of code: Kind kind-of agree with the "surprisingly easy to read bit", but not enough for me to switch. I'm still staying with my faithful Borland Delphi coding style, but I did make an adjustment in recent months. I switched from 2-space indentati

Re: [MSEide-MSEgui-talk] TMSEFileStream: how can me use a singel instance of the steram for creating+filling(via HTTP) a file then rereading the file(to compute its SHA256 digest) ?

2012-07-16 Thread Ivanko B
Then more descriptive name like "docrypto", "refreshcrypto" etc ? 2012/7/16, Martin Schreiber : > On Monday 16 July 2012 19:36:08 Ivanko B wrote: >> fstrm1.readdatastring; >> == >> Function called as procedure ? Is it consistent ? >> > The purpose is that mainfo.dgstSHA256 sees al

Re: [MSEide-MSEgui-talk] TMSEFileStream: how can me use a singel instance of the steram for creating+filling(via HTTP) a file then rereading the file(to compute its SHA256 digest) ?

2012-07-16 Thread Martin Schreiber
On Monday 16 July 2012 19:36:08 Ivanko B wrote: > fstrm1.readdatastring; > == > Function called as procedure ? Is it consistent ? > The purpose is that mainfo.dgstSHA256 sees all data of the file. The data is not used, so there is no "stringvar:= fstrm1.readdatastring;", "fstrm1.

Re: [MSEide-MSEgui-talk] TMSEFileStream: how can me use a singel instance of the steram for creating+filling(via HTTP) a file then rereading the file(to compute its SHA256 digest) ?

2012-07-16 Thread Ivanko B
fstrm1.readdatastring; == Function called as procedure ? Is it consistent ? 2012/7/16, Ivanko B : > Really needs "how to" :) Thanx ! > > 2012/7/16, Martin Schreiber : >> On Monday 16 July 2012 17:04:32 Ivanko B wrote: >>> if findfile(aoutfile) then begin >>> fstrm1:= tmsefile

Re: [MSEide-MSEgui-talk] TMSEFileStream: how can me use a singel instance of the steram for creating+filling(via HTTP) a file then rereading the file(to compute its SHA256 digest) ?

2012-07-16 Thread Ivanko B
Really needs "how to" :) Thanx ! 2012/7/16, Martin Schreiber : > On Monday 16 July 2012 17:04:32 Ivanko B wrote: >> if findfile(aoutfile) then begin >> fstrm1:= tmsefilestream.create(aoutfile); >> mainfo.dgstSHA256.digestname:= 'sha256'; // same as set by the >> property editor >> fs

[MSEide-MSEgui-talk] Python indentations in ObjPas :)

2012-07-16 Thread Ivanko B
Surprisingly easy to read & lower vert size of code: //-- function tmsefilestream.readdatastring: string; var int1,int2,int3: sizeint; lint1,lint2: int64; begin if fcryptohandler = nil then begin setlength(result,size-position); setlength(result,read(pointer(result

Re: [MSEide-MSEgui-talk] TMSEFileStream: how can me use a singel instance of the steram for creating+filling(via HTTP) a file then rereading the file(to compute its SHA256 digest) ?

2012-07-16 Thread Martin Schreiber
On Monday 16 July 2012 17:04:32 Ivanko B wrote: > if findfile(aoutfile) then begin > fstrm1:= tmsefilestream.create(aoutfile); > mainfo.dgstSHA256.digestname:= 'sha256'; // same as set by the > property editor > fstrm1.cryptohandler:= mainfo.dgstSHA256; > hash:= fstrm1.readdatastr

Re: [MSEide-MSEgui-talk] TMSEFileStream: how can me use a singel instance of the steram for creating+filling(via HTTP) a file then rereading the file(to compute its SHA256 digest) ?

2012-07-16 Thread Ivanko B
if findfile(aoutfile) then begin fstrm1:= tmsefilestream.create(aoutfile); mainfo.dgstSHA256.digestname:= 'sha256'; // same as set by the property editor fstrm1.cryptohandler:= mainfo.dgstSHA256; hash:= fstrm1.readdatastring; // here - teh original contents of "aoutfile" fstrm

Re: [MSEide-MSEgui-talk] TMSEFileStream: how can me use a singel instance of the steram for creating+filling(via HTTP) a file then rereading the file(to compute its SHA256 digest) ?

2012-07-16 Thread Martin Schreiber
On Monday 16 July 2012 16:15:35 Ivanko B wrote: > Me've performed these steps :) Which are the exact command(action) > sequence to get hash of a file stream ? > (the digest handler is set up as a componet via MSEide GUI designer > for digestname='sha256') > Please show the code. Martin --

Re: [MSEide-MSEgui-talk] TMSEFileStream: how can me use a singel instance of the steram for creating+filling(via HTTP) a file then rereading the file(to compute its SHA256 digest) ?

2012-07-16 Thread Ivanko B
Me've performed these steps :) Which are the exact command(action) sequence to get hash of a file stream ? (the digest handler is set up as a componet via MSEide GUI designer for digestname='sha256') 2012/7/16, Martin Schreiber : > On Monday 16 July 2012 15:03:38 Ivanko B wrote: >> >> if findfile

Re: [MSEide-MSEgui-talk] TMSEFileStream: how can me use a singel instance of the steram for creating+filling(via HTTP) a file then rereading the file(to compute its SHA256 digest) ?

2012-07-16 Thread Martin Schreiber
On Monday 16 July 2012 15:03:38 Ivanko B wrote: > >> if findfile(aoutfile) then begin > >> fstrm1:= tmsefilestream.create(aoutfile); > > > > fstrm1.cryptohandler:= mainfo.dgstSHA256; > > fstrm1.readdatastring; > > Doesn't work - it returns non-hashed data. > > fstrm1:= tmsefilestream.crea

Re: [MSEide-MSEgui-talk] TMSEFileStream: how can me use a singel instance of the steram for creating+filling(via HTTP) a file then rereading the file(to compute its SHA256 digest) ?

2012-07-16 Thread Ivanko B
>> if findfile(aoutfile) then begin >> fstrm1:= tmsefilestream.create(aoutfile); > fstrm1.cryptohandler:= mainfo.dgstSHA256; > fstrm1.readdatastring; Doesn't work - it returns non-hashed data. fstrm1:= tmsefilestream.create(aoutfile); fstrm1.cryptohandler:= mainfo.dgstSHA256; ha

Re: [MSEide-MSEgui-talk] TMSEFileStream: how can me use a singel instance of the steram for creating+filling(via HTTP) a file then rereading the file(to compute its SHA256 digest) ?

2012-07-16 Thread Martin Schreiber
On Monday 16 July 2012 14:29:38 Ivanko B wrote: > So, mainfo.dgstSHA256.digest(fstrm1) & > mainfo.dgstSHA256.digest(fstrm1) refer each other. As designed ? > Yes. mainfo.dgstSHA256 can track multiple streams simultaneousely. Martin -

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-16 Thread Ivanko B
http://www.birtles.org.uk/programming/LZMA.442b.7z PS: What me get is that the bloom of hundreds DELPHI custom components for crypting/archiving is a nightmare to analyze & choose & even use [building & version issues etc]. It looks better to have a couple of ones to cover all the area - fast low-

Re: [MSEide-MSEgui-talk] TMSEFileStream: how can me use a singel instance of the steram for creating+filling(via HTTP) a file then rereading the file(to compute its SHA256 digest) ?

2012-07-16 Thread Ivanko B
So, mainfo.dgstSHA256.digest(fstrm1) & mainfo.dgstSHA256.digest(fstrm1) refer each other. As designed ? 2012/7/16, Martin Schreiber : > On Monday 16 July 2012 13:08:17 Ivanko B wrote: >> Should mainfo.dgstSHA256.digest(fstrm1) do the work as well ? >> > mainfo.dgstSHA256 must be connected to fstr

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-16 Thread Martin Schreiber
On Monday 16 July 2012 14:05:47 Ivanko B wrote: > > Cipher-, compression- and encoding- chaining is ready for testing, please > > write a "how-to". ;-) > > The AES256-&-BASE64 chain looks working. > > PS: > Do You consider to extend the packager list with LZMA (best > compression available) ? > Is

Re: [MSEide-MSEgui-talk] TMSEFileStream: how can me use a singel instance of the steram for creating+filling(via HTTP) a file then rereading the file(to compute its SHA256 digest) ?

2012-07-16 Thread Martin Schreiber
On Monday 16 July 2012 13:08:17 Ivanko B wrote: > Should mainfo.dgstSHA256.digest(fstrm1) do the work as well ? > mainfo.dgstSHA256 must be connected to fstrm1, it then hashes the read data. mainfo.dgstSHA256.digest(fstrm1) returns the digest of the read data up to time and restarts hash generatio

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-16 Thread Ivanko B
> Cipher-, compression- and encoding- chaining is ready for testing, please > write a "how-to". ;-) > The AES256-&-BASE64 chain looks working. PS: Do You consider to extend the packager list with LZMA (best compression available) ?

Re: [MSEide-MSEgui-talk] TMSEFileStream: how can me use a singel instance of the steram for creating+filling(via HTTP) a file then rereading the file(to compute its SHA256 digest) ?

2012-07-16 Thread Ivanko B
Should mainfo.dgstSHA256.digest(fstrm1) do the work as well ? 2012/7/16, Martin Schreiber : > On Monday 16 July 2012 12:39:20 Ivanko B wrote: >> Me have "client stream not found" exception for the below code: >> >> if findfile(aoutfile) then begin >> fstrm1:= tmsefilestream.create(aoutfile);

Re: [MSEide-MSEgui-talk] TMSEFileStream: how can me use a singel instance of the steram for creating+filling(via HTTP) a file then rereading the file(to compute its SHA256 digest) ?

2012-07-16 Thread Martin Schreiber
On Monday 16 July 2012 12:39:20 Ivanko B wrote: > Me have "client stream not found" exception for the below code: > > if findfile(aoutfile) then begin > fstrm1:= tmsefilestream.create(aoutfile); fstrm1.cryptohandler:= mainfo.dgstSHA256; fstrm1.readdatastring; > hash:= mainfo.dgstSHA256.d

Re: [MSEide-MSEgui-talk] TMSEFileStream: how can me use a singel instance of the steram for creating+filling(via HTTP) a file then rereading the file(to compute its SHA256 digest) ?

2012-07-16 Thread Ivanko B
Me have "client stream not found" exception for the below code: if findfile(aoutfile) then begin fstrm1:= tmsefilestream.create(aoutfile); hash:= mainfo.dgstSHA256.digest(fstrm1); // << HERE fstrm1.free; mainfo.dgstSHA256 is droped on the mai form and mainfo.dgstSHA256.digestname := '