I've been wrestling with the CPMLib calls, and more or less have it working. I can start with a 4mb plain-text .pdb file comprised of about 1200 records, encrypt it with an 8-byte key on the 5.4 sdk simulator, re-write it "in place, and export it to the desktop.
Then a separate .prc on the simulator can read in the records in the encrypted .pdb file, decrypt each record, and get the original plain-text contents back. So far so good, but I'm unable to use my Tungsten E2 (o/s 5.x) to correctly decrypt the encrypted .pdb file. My understanding is that the "provider" mechanism isn't all that cooperative for a different device to decrypt a file that it didn't encrypt. The intent is to distribute the 4mb encrypted file for installation, and the code the end-user runs can decrypt the file to actually use. The CPMLib documentation could be better ... and seems oriented to Cobalt/Protein. It seems like I should be generating and/or exporting the APKeyInfoType structure. The progress so far has been slow with "trial and effort" attempts to get it to work, so I would appreciate assistance. And Merry Christmas (almost) -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
