in reply to Encrypting a Filename

I'd probably do something like in (tye)Re: Portably transforming a string to a valid filename to transform each file name into a string that only uses 64 common characters ('0'..'9','a'..'z','A'..'Z','.', and '_'), treat that like a base-64 encoded value and unencode it to get a binary string, encrypt that string, base-64 encode that and use the result as the file name. (Note that I said "like" as that node creates file names taken from a set of 65 characters.)

The file name will remain the same size (if it doesn't use any unusual characters) or increase slightly in size (if it does) and you can use any general-purpose encryption you like.

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
Re-3: Encrypting a Filename
by John M. Dlugosz (Monsignor) on Jun 15, 2001 at 03:34 UTC
    treat that like a base-64 encoded value and unencode it to get a binary string, encrypt that

    I like that! Thanks. It's inspiring comments like that that make me glad I posted to the group.

    —John