# Encrypt file name

I'm looking to encrypt (rename) mutiple files name based on a passphrase. Currently the passphrase would be numeric but I can change that to something else if required.

I would like to be able to get a encrypted file name in numeric and/or letter (avoid any special char since they are not allowed in filename) and to be able to decrypt the file name using a passphrase.

Is it possible to encrypt the filename with a function (I'm using C#) that would not allow a hacker to reverse engineer the function and then be able to decrypt the filename. Like a one way encryption but with the possibility for me to use a different decryption function on my own system to decrypt the filename.

• Do you want to encrypt only the name of the file, or also the contents of the file? – Mike Ounsworth May 4 '15 at 18:18
• A quick google shows that the .Net library System.Security.Cryptography has ALL SORTS of useful goodies in it. You should probably have a look in there for something that you can use. – Mike Ounsworth May 4 '15 at 18:21
• you need format-preserving encryption (transforming strings to strings), but I don't got a reference. – SEJPM May 4 '15 at 19:08