I have a first-cut app called SlickAvail that will fill available memory with 0s and 
1s. The idea is that to get rid of sensitive data a user will hard reset, sync the app 
under a bogus name, run the app, hard reset, and re-sync with their original user 
name.  I have no idea as to how any security agencies would view this app.

I'm interested in comments, so I'm including the central part of the app:

chunkSize = 0xFFE1;             // FFFF - 1E (64K - 30 bytes)
 do {
        // fill the memory.  DmNewHandle will not put records in the database
        // so that removing the database does not recover the space.  Only
        // a soft or hard reset will recover the space.
        while (chunkSize && (dbH = DmNewHandle(dbRef, chunkSize)) == NULL) {
                // DmNewHandle failed for lack of memory.  resize chunkSize to
                // go for the largest chunk available.  Speed up the process by
                // initially resizing chunkSize down in large amounts
                if (chunkSize > 0xFF)
                        chunkSize -= 0xFF;
                else if (chunkSize > 0xF)
                        chunkSize -= 0xF;
                else
                        chunkSize--;
        }

        // lock the handle
        if (dbH && (dbP = MemHandleLock(dbH)) != NULL) {
                // write 0s and 1s to the block
                DmSet(dbP, 0, chunkSize, 0);
                DmSet(dbP, 0, chunkSize, 1);

                // unlock but don't delete
                MemHandleUnlock(dbH);
        }
} while (dbH);

the data is left in RAM so the user can visually verify that 0 memory is available if 
they want to.

If you're interested in the software or the code, please drop me a line at 
[EMAIL PROTECTED] .  Comments are most welcome.

Thanks

trib
---------------------------------------------------------------
David Tribble, INRI Hawaii - [EMAIL PROTECTED]
808.625.2118 (v)  808.625.6315 (f)


Reply via email to