Source language: Translate to:

Variable calculates.....

Questions about NeoBook PlugIns

Moderator: Neosoft Support

Re: Variable calculates.....

Postby dec » Tue Jun 03, 2014 9:49 am

Hello!

Just to say that I begin right now testing what the hel can be happend between Windows 7 and Windows 8. I need to test the plugin (using the "base 64" aproach) in both system and view slowly what happend at all. Thanks for your patience and consideration and sorruy for the possible inconveniences! ;)
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: Variable calculates.....

Postby dec » Tue Jun 03, 2014 11:21 am

Hello to all,

Well. Good news! Apparently I found the cause of the problem and finally can provide the right solution! Please let me sometime in order to prepare the update I wanted and then I inform here about what happend and the reason that I can become crazy this two last days. :)
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: Variable calculates.....

Postby dec » Tue Jun 03, 2014 12:23 pm

Hello to all,

A new release of the npCiph plugin is available right now to be downloaded. The changes are that now the encrypted string action return a "base 64" text, and, therefore the decrypted string action requires this "base 64" in order to get the original clear text. This, which certainly put more process (in order to encode/decode to/from "base 64") apparently works very fast even with larger strings. On the other hand remember npCiph provide you with encrypt files and decrypt files actions, which do not need to encode/decode anything.

Ok. Now let me to explain how I are near to become crazy this latest days. Certainly I discover quickly (with some help -in spanish-) that we definetively can't save raw binary data into an string variable. This is the main problem, which are not discoverd until Eric found it, because with not intentional reason (maybe subconsciously) npCiph are not tested with larger strings.

Well. The solution to the refered problem is more or less clear: we need to convert the raw binary data into a string, and this can be made using "base 64". Ok. Let's go. I begin to test it and if finally we can take this approach. And here come the "crazy problem". In order to test the new approach I use the npCiph encrypt/decrypt string provided sample. This sample is divided mainly in two multiline textboxes: one with the clear text (to be encrypted) and another with the encrypted text (in "base 64").

This sample publication have two buttons too, obvious: one to encrypt the text, and another to decrypt it. When I press the encrypt button the plugin receive the content of the clear text textbox, stored in their associated variable, and the encrypted text are stored also by the plugin in the associated variable of the second textbox. Then, when I press the decrypt button, the plugin receive this encrypted text (to be decrypted) and it's taken from the textbox associated variable. And the plugin also use this associated variable to finally store the decrypted text, which must be the same than the original one.

Ok, here is the point. When the plugin encrypt the text, for some reason, cannot put more than EXACTLY 60.000 characters in the appropiate textbox. No matter what "Base64" library you used (I use three differents implementations to test...) the textbox can't shown more than 60.000 characters in the textbox associated variable. So put now in my place: now you press the decrypt button, and you provide the content of such variable to the plugin in order to be decrypted. But do not get the expected result... you only get 60.000 characters of the original text.

The reason (now) is clear: we send to the plugin only a part of the encrypted text, and therefore the plugin cannot decrypted it properly.

Once I take care about this everything become working like a charm. Now the plugin encrypt/decrypt strings sample do the things in other way: 1º When I press the encrypt button, I take the text of the first text box, the original text to be encrypted, and pass it to the plugin, and a variable in which the plugin store the resulted "base 64" text, that is, the encrypted text. This variable now are not associated with any textbox, it's just a Neobook variable like other. And bingo! This variable contain all the resulted encrypted text without any limitation of characters (like we can expected) and therefore we can use to decrypt it in order to obtain the original text without problems.

And that's all. Thanks for the patience and sorry for the possible inconveniences. I hope the npCiph plugin can serve you now as you wanted. ;)

P.S. If anyone have some question about all of this, do not hesitate to join into this thread.
Last edited by dec on Wed Jun 04, 2014 7:24 pm, edited 1 time in total.
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: Variable calculates.....

Postby dec » Tue Jun 03, 2014 1:05 pm

.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: Variable calculates.....

Postby HPW » Tue Jun 03, 2014 1:32 pm

Hello Dec,

From the thread:
The help-file is wrong here:


Just rechecked it. The help file is still wrong now.
Dave should put this doc-mistake on his list.

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Variable calculates.....

Postby dec » Tue Jun 03, 2014 1:57 pm

Hallo Hans!

HPW wrote:Hello Dec,

From the thread:
The help-file is wrong here:


Just rechecked it. The help file is still wrong now.
Dave should put this doc-mistake on his list.

Regards


Certainly I don't know or take care about that while trying to solve the problem, but, yes, the help is wrong in this point and can cause some confusion. Just after discover what happend I search for "60000" on this forum and the refered thread appear and definetively confirm the cause of my error. Maybe if I read such thread or know the 60.000 chars limitation I discover the error more quickly. Anyway I never forget this limitation in the future.

Thanks Hans!
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: Variable calculates.....

Postby Neosoft Support » Wed Jun 04, 2014 10:10 am

NeoBook's Text Entry Field is derived from the standard Windows Edit control. Microsoft's documentation states that when the [size limit] parameter is zero, the text length is set to 64,000 characters. (For older versions of Windows the default length was 32,000 characters.) NeoBook's help file says "You can limit how much text the reader may enter by typing a number into the Limit input to box. Specify 0 (zero) to allow the maximum number of characters to be entered." Of course, this isn't clear and should instead say "64,000 characters". I'll make this change for the next update.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Variable calculates.....

Postby dec » Wed Jun 04, 2014 11:05 am

Hello,

Neosoft Support wrote:NeoBook's Text Entry Field is derived from the standard Windows Edit control. Microsoft's documentation states that when the [size limit] parameter is zero, the text length is set to 64,000 characters. (For older versions of Windows the default length was 32,000 characters.) NeoBook's help file says "You can limit how much text the reader may enter by typing a number into the Limit input to box. Specify 0 (zero) to allow the maximum number of characters to be entered." Of course, this isn't clear and should instead say "64,000 characters". I'll make this change for the next update.


What about the 60.000 chars limitation Dave? I only mention here because this limitation do not match with that you mentioned of 64.000. The limitation I found this time is 60.000 and apparently others users (see the refered thread above) too. Ok. I say this only for your consideration, because may this have some explanation or need some attention from you.
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: Variable calculates.....

Postby Neosoft Support » Fri Jun 06, 2014 1:01 pm

I'm not in the office today, so I can't check the source code, but whatever the limit is hasn't changed for quite some time. I think the default limit actually is 64,000 characters, but if you're counting characters the actual results may be less depending on line breaks, etc. taking up some of the space.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Variable calculates.....

Postby dec » Fri Jun 06, 2014 1:07 pm

Hello,

Neosoft Support wrote:I'm not in the office today, so I can't check the source code, but whatever the limit is hasn't changed for quite some time. I think the default limit actually is 64,000 characters, but if you're counting characters the actual results may be less depending on line breaks, etc. taking up some of the space.


This is not a problem Dave. We can deal with it. ;)
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Previous

Return to PlugIn Discussions

Who is online

Users browsing this forum: No registered users and 2 guests