Encrypt & Compression a file failed - WeOnlyDo Discussion board

Encrypt & Compression a file failed (wodCrypt)

by clement su, Monday, January 02, 2012, 08:47 (4460 days ago)

I use the code below to encrypt & compress a very large text file (4.07 GB ) , but failed (The length of result file is 792 bytes). And version of wodCrypt.dll is 2.1.4 .

File size list of testing:
Brfore After
1.01 GB 11.2 MB
2.03 GB 22.5 MB
3.05 GB 33.8 MB
4.07 GB 792 KB
5.08 GB 12.0 MB

Dim srcfile As New FileBlob
Dim destfile As New FileBlob

Set oCrypt = New wodCryptCom

oCrypt.Type = TripleDES
oCrypt.InitVector = 123
oCrypt.SecretKey = Now
oCrypt.Compression = GZipCompression
oCrypt.Optimized = False

srcfile.FileName = txtSource.Text
destfile.FileName = txtDest.Text
oCrypt.Encrypt srcfile, destfile

Please advise.
Thanks

Re: Encrypt & Compression a file failed

by woddrazen, Monday, January 02, 2012, 10:02 (4460 days ago) @ clement su

Hi,


I think I was able to duplicate the issue.

I will now transfer this issue to our developers to see if they can do the same in debug mode, and determine why this happens.

We will send you reply when we have more info about it.


Regards,
Drazen

Re: Encrypt & Compression a file failed

by wodSupport, Monday, January 02, 2012, 23:07 (4459 days ago) @ woddrazen

Clement,

I checked it out, current IBlob interface doesn't allow files larger than 4.7gb to be processed, since it cannot store larger numbers in LONG value.

We will fix this, but it's going to take 3-4 days, and make significant changes to wodCrypt to handle large files.

I'll let you know when we have something to test.

Kreso

Re: Encrypt & Compression a file failed

by clement su, Monday, January 09, 2012, 07:49 (4453 days ago) @ wodSupport

Hi
Now we can encrypt and compression a file over 4.7Gb with new dll ( Ver: 2.2.0.97 ) , but fail in decrypt and uncompression . The file size after decrypt and uncompression is 72.7 MB .

Please check it ASAP .

Re: Encrypt & Compression a file failed

by wodDamir, Monday, January 09, 2012, 14:10 (4453 days ago) @ clement su

Hi,

We're still in process of implementing this. We'll let you know immediately as we update component with these changes.

Regards,
Damba

Re: Encrypt & Compression a file failed

by woddrazen, Wednesday, January 11, 2012, 18:55 (4450 days ago) @ wodDamir

Hi,


Can you please download latest version and try it again?

Let us know how it goes.


Drazen

Re: Encrypt & Compression a file failed

by clement su, Thursday, January 12, 2012, 10:04 (4450 days ago) @ woddrazen

Hi
Decrypt and uncompress fail in 2gb , 3gb and 4gb files

The version of component is 2.2.0.98.


BR
Clement

Re: Encrypt & Compression a file failed

by woddrazen, Thursday, January 12, 2012, 10:08 (4450 days ago) @ clement su

Clement,


Can you maybe show us exact code snippet you are using? So we can duplicate this on our side.


Drazen

Re: Encrypt & Compression a file failed

by clement su, Thursday, January 12, 2012, 11:16 (4450 days ago) @ woddrazen

Hi
program code as follow:

Private Sub cmdDecrypt_Click()

Dim srcfile As New FileBlob
Dim destfile As New FileBlob

Set oCrypt = New wodCryptCom
If Check1.Value = 1 Then
oCrypt.Type = TripleDES
oCrypt.InitVector = 123
oCrypt.SecretKey = Now
Else
oCrypt.Type = None
End If


If Check1.Value = 1 Then
oCrypt.Optimized = True
Else
oCrypt.Optimized = False
End If

oCrypt.Compression = GZipCompression

srcfile.FileName = txtSourceDec.Text
destfile.FileName = txtDestDec.Text

oCrypt.Decrypt srcfile, destfile

Set srcfile = Nothing
Set destfile = Nothing

MsgBox Decryption Complete
End Sub


Private Sub cmdEncrypt_Click()
Dim srcfile As New FileBlob
Dim destfile As New FileBlob
Dim a As IStream

Set oCrypt = New wodCryptCom

If Check1.Value = 1 Then
oCrypt.Type = TripleDES
oCrypt.InitVector = 123
oCrypt.SecretKey = Now
Else
oCrypt.Type = None
End If

oCrypt.Compression = GZipCompression

If Check1.Value = 1 Then
oCrypt.Optimized = True
Else
oCrypt.Optimized = False
End If



srcfile.FileName = txtSource.Text
destfile.FileName = txtDest.Text

oCrypt.Encrypt srcfile, destfile

MsgBox Encyption Complete

End Sub

Re: Encrypt & Compression a file failed

by woddrazen, Thursday, January 12, 2012, 15:50 (4450 days ago) @ clement su

Clement,


I just finished with testing using your code snippet. In all my tests component works as expected.

I was testings with 2GB and 5GB file and I can decrypt data without any problem.
Can you please confirm that you are using latest version?
You can check version number inside wodCrypt Version Property.
[code]MsgBox crypt1.Version[/code]
if problem persist, can you maybe send us your sample to techsupport@weonlydo.com ?
Also, which file type you encrypt and decrypt in your test and which OS you are using?


Drazen