I want to decrypt variable length strings using EncDES. I'm trying to: read 8 characters from string s, write them to another string eStr, decrypt eStr, copy/concatenate the decrypted string dStr to a string tStr read next characters in s, decrypt, etc keep doing this till I've read all the characters in s display tStr in a field
Here is some of the code I'm using and it is blowing up (just wrote to a memory location in the storage heap) on the TxtSetNextChar function. eStr is not NULL. TxtGetNextChar sets ch to 255. Is there something simple I'm doing wrong here or am I using the wrong functions? while (i < l) { for (j = 1; j < 8 && i < l; j++) { k = TxtGetNextChar(s, i, &ch); k = TxtSetNextChar (eStr, j, &ch); ++i; } err = EncDES(eStr, deskey, dStr, false); if (i < 8) StrCopy (tStr, dStr); else StrCat (tStr, dStr); } John McDowell -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/