EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Encrypting Files

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#3716
Posted: 09/06/2007 14:51:39
by Eder Quiñones (Basic support level)
Joined: 09/06/2007
Posts: 2

Hi, I'm trying to Encrypt a File using PGPBBox and this is what I have:
Code

Set objPGP = WScript.CreateObject("PGPBBox.ElPGPWriterX", "objPGP_")

objPGP.Armor = true
objPGP.CompressionAlgorithm = 1
objPGP.CompressionLevel = 9
objPGP.EncryptFile "c:/readme.txt", "c:/readme.pgp"


But i get this error: pgpbbox.ElWriterClassX: no key for encryption found

Anyone knows what's happening. Thanks in advance.
#3717
Posted: 09/06/2007 23:41:32
by Eugene Mayevski (EldoS Corp.)

To encrypt the files using PGP you need to have the keys (by default). Assign them using EncryptingKeys property. See the sample projects (for VB6, we don't have VBSCript samples for PGP at the moment) for details.


Sincerely yours
Eugene Mayevski
#3721
Posted: 09/07/2007 20:24:18
by Eder Quiñones (Basic support level)
Joined: 09/06/2007
Posts: 2

Thanks for your post!.

But, I don't get it, where do I find those keys.

Code
objPGPBBoxKeyring = CreateObject("PGPBBox.ElPGPKeyringX")
WScript.ConnectObject objPGPBBoxKeyring, "KeyX_"
' I don't know how to find those files!
objPGPBBoxKeyring.LoadFromFiles file1, file2, 0


But, then I need to find a key, let's say...
Code
objPGPBBoxKeyring.FindPublicKeyByID
'or
objPGPBBoxKeyring.FindPublicKeyByEmailAddress


Now...

Code
objPGPBBox = CreateObject("PGPBBox.ElPGPWriter")
WScript.ConnectObject objPGPBBox, "PGPX_"
objPGPBBox = EncryptingKeys.AddPublicKey(objPGPBBoxKeyring.GetPublicKey('id/email')


Finally encrypt.

The main problem is that I can't find those keys/files.
#3722
Posted: 09/08/2007 01:13:31
by Eugene Mayevski (EldoS Corp.)

I think you need to read some information about how PGP works before doing anything. Without knowing basics you won't provide security. Most likely you will put information into danger.


Sincerely yours
Eugene Mayevski

Reply

Statistics

Topic viewed 1999 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!