Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 10:29 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: How to use 1crypt DLL with Opus - encrypt file
PostPosted: March 15th, 2010, 10:01 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Thanks to the groundbreaking work of others here (Stephen, Mack, Sandyn...), 1crypt is fairly easy to implement in Opus and it's fast.

earlier works here:
viewtopic.php?t=2862&highlight=openfile
viewtopic.php?t=2739&highlight=1crypt+onecrypt has script examples
Quote:
EOutString=MyDLL.CallFn("EncryptString","false","string","string",Key,"string",EInString)
DOutString=MyDLL.CallFn("DecryptString","false","string","string",Key,"string",DInString)


So some further questions on using the 1crypt.dll
1. can anyone help with script code for encrypting/decrypting files?

2. also would appreciate learning some explanation of the arguments used in the CallFn() -- great if you could cover both cases (strings and files), both directions

3. any advice or caveats for using/not-using DLLs going forward? Windows 7 issues or other anticipated problems. (BTW, Atma provides 1Crypt as an ActiveX control (since ~2008?) and you have to ask for the DLL version if you want it)

4. ( #4 is more of a 'what I'm thinking' rather than a direct question )
In an Opus Pub, I would decrypt a previously encrypted .html file -- I am wondering if I must write that to disk first in order to view it in a Browser Object. I know... 'silly' thinking, but hoping I could store BLOB in SQLite DB in RAM. I will Post this as a separate topic.

If there are better options than 1crypt, happen to consider alternatives. (EnigmaProtector has been mentioned before -- not encryption of files but preventing user access).

Thanks,
Larry

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: March 16th, 2010, 1:45 am 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Larry,

A useful feature for protecting pubs using EnigmaProtector is adding resource files to its Virtual Box. They are then available to the pub yet hidden and cannot be otherwise accessed, copied.

I wonder if this would be of help to your project?

(If you try EP with an Opus v7 pub, publish in Opus using no compression. EP upon completing its protection will compress it.)

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: March 16th, 2010, 1:27 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Quote:
EnigmaProtector... Virtual Box. They are then available to the pub yet hidden and cannot be otherwise accessed, copied.
I wonder if this would be of help to your project?

Thanks Stephen.
Well I think that could be a 'Plan B' for me. However I face two concerns there:
-- EnigmaProtector and other encapsulators I think are fairly well-known and could be cracked?? Or are my worries unfounded?
-- I am planning to develop and publish something like 10 or more eBooks and was hoping for 1 Install process. So a User starts with the 1st eBook and may buy/add one or more later. He should not have 5 or 10 'installed applications' for this. So how does EP handle this case?

FYI, here is an earlier Post discussing the "Install one, run many... pubs".
viewtopic.php?t=3530&highlight=run+install
Quote:
ILMPlay.exe Untitled1.ilm

Where ILMPlay.exe is DW's player or your EXE and Untitled1.ilm is the published data file (s) including any necessary path.


Besides having their own content files, extra eBooks will have some data in a DB as well (add-on DB info could get consolidated into the one original/main DB - I think). "Main DB" will also store User inputs accumulating over time.

So when it comes to considering EnigmaProtector, I'm trying to understand how that would work over the life-cycle of adding on Pubs and Opus-updating existing ones.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: March 16th, 2010, 1:53 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Larry,

While I use EP for individual Opus pubs, I haven't tried it with multiple modules as you describe. I would encourage you to contact Vladimir directly at EP support. He can answer if EP can do this. Plus, as the developer, he has been very helpful adding special features, especially since these improve EP's functionality.

You can also ask him about EP's success in preventing cracks. He recently wrote to me that he has not yet seen any evidence of successful cracking. He is always working on strengthening EP to further improve its resistance.

For multiple modules, I have been using an LMS with eCommerce features (PayPal) to package Opus web pubs. Everything is online, including DB's. My guess is that while it has robust security for the vast majority of users, a determined expert hacker probably could access it. But the effort involved for little payoff may make this unappealing.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: March 16th, 2010, 2:24 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Quote:
would encourage you to contact Vladimir directly
...For multiple modules, I have been using an LMS with eCommerce features to package Opus web pubs.

Yeah, I'll have to think clearly on this and then contact Vladimir.

I had not given much thought to LMS for this... for the general population. I figured LMS might come to be part of the equation if I engaged corporate customers.
--- I'll have to research and learn how an LMS works.
--- it seems that approach would preclude distributing through shareware sites or Digital River etc.

So back to the original question I'd still like to know how to do the DLL call to 1crypt -- as it applies to FILES. Then I'll have a better idea of the tradeoffs for architecting and for deploying.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject: Resolved - got file encryption working
PostPosted: March 25th, 2010, 5:00 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
In the OP I asked
Quote:
So some further questions on using the 1crypt.dll
1. can anyone help with script code for encrypting/decrypting files?

2. also would appreciate learning some explanation of the arguments used in the CallFn() -- great if you could cover both cases (strings and files), both directions
Some HOW I missed seeing/finding the 1Crypt Help Files. So the general documentation there does explain the 'how to use' -- as well as providing other help topics. :oops:

With my 'blindspot' operating, I emailed Atma Software and Mark was kind enough to help, and went out of his way to look up ECMA scripting/syntax, review our sample CallFn code, and got me close enough to work out the syntax details.

Here's the working pieces. Of course Filename variables will have full path.
Code:
for encrypting a File
EResult = MyDLL.CallFn("EncryptFile","false","string","string",Key,"string",EInFILE,"string",EOutFile) ;

for decrypting a File
DResult = MyDLL.CallFn("DecryptFile","false","string","string",Key,"string",DInFILE,"string",DOutFile) ;
The 'EResult' and 'DResult' values returned are documented in the local Help files for 1Crypt ( Product is very affordable and reilable, found at www.atma-software.com -- Opus can use the DLL version, and currently NOT use the ActiveX / .ocx version ).

[Lar Edit:] The file operations work fine, however EResult and DResult variables are returned as null in Debug.trace (or are not being returned?). Expected values are Integers:
Quote:

0 : Successfully encrypted
-1 : Unable to open input file
-2 : Unable to open output file
-4 : Key is empty string


If any Newbies chance across this, there is a bit more code needed around these to Load the DLL, pass parameters to the function, etc. One of the earlier links/posts shows the scripts for 'strings' and is easily adapted now to 'files'.

Cheers.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 33 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group