Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8823325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:19:34+00:00 2026-06-14T06:19:34+00:00

Commonly passwords are encoded with MD5 on web sites. I’m considering encoding user names

  • 0

Commonly passwords are encoded with MD5 on web sites. I’m considering encoding user names as file names in MD5 too. I’d use PHP on a Linux based server. Are there any drawbacks to encrypting a file name with PHP to MD5 besides being indistinguishable without decryption?

<? php 
if(isset($_POST['register'])){
    $username = md5($_POST['username']);
    $email = htmlentities($_POST['email'], ENT_QUOTES|ENT_XML1);
    $password = $_POST['password'];
    $c_password = $_POST['c_password'];

    $xml = new SimpleXMLElement('<user></user>');
    $xml->addChild('password', md5($password));
    $xml->addChild('email', $email);
    $xml->asXML('users/'.$username . '.xml');

    header('Location: validate.php');
    die;
}
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T06:19:35+00:00Added an answer on June 14, 2026 at 6:19 am

    Any Linux filesystem you’re using can accept any character in a filename except for the directory separator. So why don’t you either replace any / characters with something else or, better yet, reject any attempt to register with a username that contains a / (and probably any other nonprintable character)? “Oh, but what about collisions”? If you’re using a hashing algorithm, you’re not eliminating the possibility of collisions, you’re just reducing it while adding useless computational complexity. To generate a unique identifier, either use an incrementing value (like Unix does with “User IDs”) or just generate a uuid: http://php.net/manual/en/function.uniqid.php – and store that mapping in a database.

    Maintaining a mapping of usernames to IDs is what everyone else does for a reason. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

commonly on say PHP or other web frameworks getting the total response time is
I have seen two commonly used techniques for adding the directory of the file
When writing programs (C#.NET) I'll commonly use external libraries I've downloaded from various websites
A commonly problem I see in lots of web languages is that database connections
I do not know much about encrypting. I am trying to use authenticate user
What techniques do people commonly use for uploading, storing and presenting images with a
I think one commonly known way of adding PHP to an Apache webserver is
While recursive scans are commonly use to scan through nested objects / data. It
Commonly, I use the same function settings. I'm wondering if there is a method,
I commonly use Mixins in test code to share utility methods across tests. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.