#1 2016-09-12 19:51:50

jars
Member
Registered: 2015-05-15
Posts: 29

How can I Encrypt and Decrypt a TMemoryStream with AES

Hi guys,
I'm new in mormot and need to compress a TMemoryStream with ZLib and then encrypt with AES before send thru TCP.
An external application then must decrypt and decompress this Stream.
Can anybody help me.
Thanks in advance.

Offline

#2 2016-09-13 06:47:04

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: How can I Encrypt and Decrypt a TMemoryStream with AES

Which AES block size? Which AES chaining block? Which AES padding?
Which ZLib layout (deflate/gzip/zip)?
What is on the client/server ends: another mORMot server?

What is the link with mORMot, which already does the encryption and compression for you.

Offline

#3 2016-09-13 12:01:08

jars
Member
Registered: 2015-05-15
Posts: 29

Re: How can I Encrypt and Decrypt a TMemoryStream with AES

Hi AB.
I need any encryption that is standard.
I'm using ZCompressStream (s, s1, zcMax) from ZLib;
On the client side have´t Mormot, so I need something as standard as possible.
I try to use Mormot because I have recommended it.
I just need some example of use.
Thank you.

Offline

#4 2016-09-13 13:17:08

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: How can I Encrypt and Decrypt a TMemoryStream with AES

IMHO the most standard would be using HTTPS / TLS 1.2 with mutual authentication, and enable the "deflate" compression.
It will work with all kind of clients, and is supported by mORMot on server side.

Offline

Board footer

Powered by FluxBB