Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Problem with Binaryfile


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-20-2008, 02:46 PM
Newbie
 
Join Date: May 2007
Location: France
Posts: 2
Default Problem with Binaryfile

I'm french and I speak just a little.
Excuse my bad English.
I want a soft for encrypte a texte file and I use the EncrypteFile .zip for to understand the process.
I have a problem with binaryfile.dll
after decrypt end modify when I encrypt, I have the message with line "c = reader.ReadBytes(data(),32768)"


Thinks for you help
Attached Images
File Type: jpg error.jpg (26.0 KB, 7 views)
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 02:59 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,334
Default

Can you post your code?
I've just checked EncryptFile example and it works properly.
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 05:19 PM
Newbie
 
Join Date: May 2007
Location: France
Posts: 2
Default

Think you
Attached Files
File Type: sbp CryptNotes.sbp (3.3 KB, 9 views)
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 06:10 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,334
Default

In line 68: data() = Crypto.Decrypt(PassPhrase,secret())
The 'data' array changes its size.

You can no longer assume that it is an array of 32768 bytes.
Therefore you should redimension it in the beginning of EncryptFile sub by adding:
Dim data(32768) As Byte

BTW, EncryptFile can handle large files. In your case you could use a much simpler code, similar to this example: http://www.basic4ppc.com/help/crypto/index.html
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting the Image to display in the BinaryFile batninja Questions & Help Needed 7 05-12-2007 01:18 PM
BinaryFile Error dlfallen Bug Reports 2 05-01-2007 09:34 PM


All times are GMT. The time now is 01:44 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0