Hello, just created a code for login using encrypted password method when user is registering at that time i made a passsword encryption script. But the main problem is that when it comes to verify login how do i veryfy the password as that password is saved as encrypted password how do i very it Thank yOU function hashSSHA($password) { $salt = sha1(rand()); $salt = substr($salt, 0, 10); $encrypted = base64_encode(sha1($password . $salt, true) . $salt); $hash = array("salt" => $salt, "encrypted" => $encrypted); return $hash; } function adduser($connect) { $fname = $_POST['FirstName']; $lname = $_POST['LastName']; $uname = $_POST['username']; $pass …

Member Avatar
Member Avatar
+0 forum 7

Hello, I am trying to insert a registration form with password using `password_hash()` but I am not sure what is wrong with whatever i am doing because the password doesn't get inserted into the database although all the other values do and no errors. database : password | varchar(255) php: $res = $conn->prepare("INSERT INTO table(id, name, pass) VALUES(:id, :name, :pass)"); $id = $_POST['id']; $name = $_POST['name']; $password = $_POST['password']; $password = password_hash($password, PASSWORD_DEFAULT); $res->bindParam(':id', $id, PDO::PARAM_STR); $res->bindParam(':name', $name, PDO::PARAM_STR); $res->bindParam(':pass', $password, PDO::PARAM_STR); $res->execute(); html: `<input name="password" type="password" placeholder="Password"` thanks in advance.

Member Avatar
Member Avatar
+0 forum 3

Hi Dw. I'm using this code available from [here](http://www.coderslexicon.com/using-hashes-to-check-if-a-file-changed-in-vb-net/) and I have changed it from keeping the hashs on a variable(array) to writing it on a file. Now what I want to do is to read this file. Basically I'm scanning through all my drive file and for each file I hash it and its hash code I save it on a text file on its own line and I have a special separator then a file name. So what I want to do is to read through the text file and get the names and on each file I …

Member Avatar
Member Avatar
+0 forum 2

Hi all! I'm asking this after reading so many articles on the internet about hashing & salting, and the entire theme of securing database connection settings. I'm making an application that uses mysql database. Currently, the connection settings are stored as plain text in the Win Registry. Since this is easy to read, I am looking for a way of protecting this password so that even if some bad guy will be able to read it in the registry, he still won't be able to get into my mysql database. Lots of threads says I should use password hashing with …

Member Avatar
Member Avatar
+0 forum 3

Hello. I am beginning the process of implementing password encryption for User's on my future site (The site is not live or available yet). I have been reading up on hashing passwords and storing them in the database. **My question are as follows**: * I believe it has said that once hashed, the password is stored as plain text and not reversable - I take this to mean that it cannot be viewed by me in its original state, the original User password. Is this correct? * The online PHP manual suggests using password_hash() or crypt(); This is an aspect …

Member Avatar
Member Avatar
+0 forum 5

My professor gave us an assignment that I am not entirely sure how to start correctly. She gave us 2 java classes as well to use. Any assistance would be greatly appreciated... So basically, two things need to be done. I need to create two more classes, ExternalHashing and IndexHashTable...and I have some work so far but I am not sure how to edit it to make it work for this assignment. I already have some of it...but I had done a previous assignment and used basically that, but I am not sure how to edit it to make it …

Member Avatar
Member Avatar
+0 forum 3

Please help me with this I really need your help. Thank you so much. #define EMPTY __________ #define DELETED __________ #define max 1100 #define setSize 20 typedef struct { unsigned long ID; char Lname[16],Fname[24],MI; char course[8],year; }Student; typedef struct { Student Stud; int link /*used to link to next synonyms*/ }ctype; typedef struct { ctype Header[max]; int avail; /*stores the index of the first available cell in the synonym area*/ }*Dictionary; typedef unsigned long int BitVect; typedef struct { unsigned long IDS[setSize]; int last; /*index of last element in the set*/ }*Set; Do the following: 1. Write an appropriate definition …

Member Avatar
Member Avatar
+0 forum 3

Hi please help me with this. My head really hurts from attempting to answer this question. Thanks a lot! #define maxCells 1000 #define maxCS 11 #define maxIT 19 typedef struct { char LN[16], FN[24], MI; }nametype; typedef struct studtype { unsigned long ID; nametype name; char course[8]; int yr; }student; typedef struct ctype { student stud; int next; }celltype; typedef struct { int *Header; int CourseCtr; /*holds the # of elements for each course*/ }CSIT; typedef CSIT Dictionary[2]; typedef int LIST; typedef struct { celltype heap[maxCells]; int AvailPtr; /*holds the index to the first available cell in the VH*/ }*VirtualHeap; …

Member Avatar
Member Avatar
+0 forum 1

Having issues creating table using chain hashing (linked nodes). The program compiles, but is crashing during execution. I admit I don't really know what I'm doing since I havent really used inked lists in forever. A lot of this code I do not expect to work right away, such as the remove method, what I have written is a quick run-down of what I am actually expecting the code to do. Another set of eyes on this could really help. I just want to get this working so I have a firmer understanding of manipulating linked lists in time for …

Member Avatar
Member Avatar
+0 forum 3

Hey, [B][U]Problem:[/U][/B] Need to find an algorithm that given 2 sequences of [B]n[/B] numbers each, say [B]S1[/B] and [B]S2[/B], and 1 number, say [B]x[/B], it would tell if x is in the sum result of S1 and S2. The hashing function, say [B]h[/B], must be picked at random from a universal set of hashing functions, say [B]H[/B]. The algorithm should not take more than [B]O(n)[/B] time. [B][U]My attempt:[/U][/B] Assume H is a universal hashing family, from which h(z) is picked at random. Use h on every element, say [B]s1[/B] in [B]S1[/B] and [B]s2[/B] in [B]S2[/B] to compute [B]h(s1 + s2)[/B] …

Member Avatar
Member Avatar
+0 forum 18

Hi All, I'm in the middle of building a new login/registration class and was going to apply a hashing function to the pw and an activation token, when I came across the hash_hmac function. I've tried finding out more about it, but info is pretty scarce. Could anybody shine some light on this for me? I gleaned this (leaving out the last parameter for now): [CODE]echo hash_hmac('sha256', 'the string to be hashed', 'my_secret_key'); echo hash('sha256', 'the string to be hashed' . 'my_secret_key');[/CODE] Obviously, I'm not expecting the outputs to be the same, but does the first line have an advantage …

Member Avatar
Member Avatar
+0 forum 6

Hi, I am trying to use a hash table to sort the two string words from an input file ,display words and again put them back to an output file. so if this is my input in input.txt: thank Merci yes oui hello bonjour the sorted output in output.txt will be: hello bonjour thank Merci yes oui I was wondering if you can help me start it.Thanks!

Member Avatar
Member Avatar
+0 forum 20

Hi, I'm currently looking at password hashing and from what I've read so far, it seems pretty pointless. I read this [URL="http://phpsec.org/articles/2005/password-hashing.html"]article[/URL] which recommends using MD5 or SHA-1, however I Googled for decrypters and found them witin the first 3 results on Google. I don't quite understand the purpose of encrypting if it can just as easily be decrypted again. Can someone please explain why one would need password hashing and tell me if there's an encryption that cannot be decrypted? Thanks, Ashton.

Member Avatar
Member Avatar
+0 forum 6

The End.