This question already has an answer here:
I have a registration page that allows users to insert a password. I hash the password upon registration so that it is stored more securely in the database.
When the user logs in with the same password, the two hashes don't match and the user cannot log in.
This is my first time using a hash and it didn't behave as I expected:
This is the hashing code on the registration page:
$salt =""; function cryptPass($input, $rounds = 9){ $salt = ""; $saltChars = array_merge(range('A','Z'), range('a','z'), range('0','9')); for($i = 0; $i<22; $i++) { $salt .=$saltChars[array_rand($saltChars)]; } return crypt($input, sprintf('$2y$%02d$test$', $rounds) . $salt);}$hashedpass = cryptPass($pass1); echo $hashedpass;//************Insert all the members's input to the database**************************// $query = mysql_query("INSERT INTO members(user_name, first_name, last_name, governorate, district, village, birth_date, email_address, specialization, password, salt, registered_date )VALUES('$username', '$firstname', '$lastname', '$governorate', '$district', '$village', '$bdate', '$email', '$specialization', '$hashedpass', '$salt', now())")or die(mysql_error()); i did add salt but it give empty
This is the hashing code on the login page
function cryptPass($input, $rounds = 9){ $salt = ""; $saltChars = array_merge(range('A','Z'), range('a','z'), range('0','9')); for($i = 0; $i<22; $i++) { $salt .=$saltChars[array_rand($saltChars)]; } return crypt($input, sprintf('$2y$%02d$test$', $rounds) . $salt);}$hashedpass = cryptPass($pass); echo $hashedpass;$sql=mysql_query( "SELECT user_id, email_address, first_name, user_name FROM members WHERE email_address='$email'AND password= '$hashedpass' LIMIT 1") or die("error in members table");$login_check = mysql_num_rows($sql); if($login_check > 0)the hashing password = $2y$09$test$4ZGgCiXdKzgQvuzwu.AxfdWvZadDCE.LD6HCkrK3ZsqJeN7e I am using this to change the MD5 of all .rar-files.
FOR %%a in (*.rar) do ECHO.>> %%aThe problem is: The *.bat has to be in the folder where the .rar-files are, but I want to put the *.bat into root.
ROOT |----Folder1 |------*.rar |----Folder2 |------*.rar |----Folder3 |------*.rarHow do I have to change the code that it changes the MD5 of every *.rar that is in every folder?
Hello as you can see below I m trying to make a (android) app which check md5 hash of filethis code works only for small filescan someone help me?
final TextView informations = (TextView) findViewById(R.id.Informations); final EditText input = (EditText) findViewById(R.id.ToCrack); String filepath = data.getDataString(); String rawtext; String hash; StringBuilder text = new StringBuilder(); filepath = filepath.split("//")[1]; File file = new File(filepath); Toast.makeText(getApplicationContext(),"Loading: "+filepath,Toast.LENGTH_LONG).show(); FileInputStream fis = null; BufferedInputStream bis = null; DataInputStream dis = null; try{ fis = new FileInputStream(file); bis = new BufferedInputStream(fis); dis = new DataInputStream(bis); while (dis.available() != 0){ text.append(dis.readLine()+"\n"); } } catch (IOException e){ e.printStackTrace(); } finally { try{ fis.close(); bis.close(); dis.close(); } catch (IOException ex){ ex.printStackTrace(); } } rawtext = text.toString().substring(0, text.length()-1); hash = new MD5(rawtext).hexdigest(); if (hash.equals(input.getText().toString())){ informations.setText("Hash correspond with the file!"); } else{ informations.setText("File hash= "+hash+"\nHashes does not correspond :("); } Toast.makeText(getApplicationContext(),"Copied file hash to clipboard.",Toast.LENGTH_LONG).show(); I have CouchDb database with documents containing attachments. Each attachment has md5 hash in "digest" field. When I make a local-to-local replication these fields are saved and everything seems to be fine. But when I make a local-to-remote replication those fields are just gone. Is there a way to preserve "digest" fields from deletion? Or there are any methods for adding those fields manually after replication?
I'm trying to make a VBScript files to pass arguments to an MD5Checker Tool. And the arguments are the directory and sub-directory listings of a certain directory (e.g. "C:\Stuff").
Arguments passed like: Md5Checker.exe "file1.exe" "More Stuff\files2.exe"
I need an example of how to do this.
Casa - Mapa del sitio - Intimidad - Enlaces - Copyright © 2013 Cortex IT Ltd : Contacto : admin @ cortexit.co.uk
Please note that by viewing our site you agree to our use of cookies (see Intimidad for details). You will only see this message once.