Encryption problem solved
Brendan Murphy
bmurf at comcast.net
Thu Apr 6 21:23:13 CDT 2006
OK, this one drove me nuts, but I finally got encryption to work.
Shown below is the code that works.
-----------
' For the open case...
vdb.UseEncryptionKey(encryptionKey, EVDataKind.kStructureAndRecords)
vdb.open(documentFile)
-----------
' For the create case...
vdb.create(documentFile, EVDbMode.kDscDatBlbInd,
SEGMENT_SIZE * 1024, EVOs.kOsWindows)
vdb.Encrypt(encryptionKey, EVDataKind.kStructureAndRecords)
-----------
Before I got to this point, I was getting a hard crash in
Valentina when I called the following code.
vdb.UseEncryptionKey(encryptionKey, EVDataKind.kStructureAndRecords)
vdb.create(documentFile, EVDbMode.kDscDatBlbInd,
SEGMENT_SIZE * 1024, EVOs.kOsWindows)
vdb.Encrypt(encryptionKey, EVDataKind.kStructureAndRecords)
It seems that calling UseEncryptionKey for a create situation
causes the crash in the Encrypt method. Even though this is
incorrect code, it should not cause a hard crash.
More information about the Valentina
mailing list