<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.twig.es/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.twig.es/index.php?action=history&amp;feed=atom&amp;title=Checking_the_password_using_hashes_and_salt</id>
		<title>Checking the password using hashes and salt - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.twig.es/index.php?action=history&amp;feed=atom&amp;title=Checking_the_password_using_hashes_and_salt"/>
		<link rel="alternate" type="text/html" href="https://wiki.twig.es/index.php?title=Checking_the_password_using_hashes_and_salt&amp;action=history"/>
		<updated>2026-05-06T16:42:59Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.0</generator>

	<entry>
		<id>https://wiki.twig.es/index.php?title=Checking_the_password_using_hashes_and_salt&amp;diff=4247&amp;oldid=prev</id>
		<title>George2 at 10:38, 8 December 2018</title>
		<link rel="alternate" type="text/html" href="https://wiki.twig.es/index.php?title=Checking_the_password_using_hashes_and_salt&amp;diff=4247&amp;oldid=prev"/>
				<updated>2018-12-08T10:38:43Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 10:38, 8 December 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;lng&lt;/del&gt;=&amp;quot;php&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;lang&lt;/ins&gt;=&amp;quot;php&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$check = hash('md5', $salt.$_POST['pass']);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$check = hash('md5', $salt.$_POST['pass']);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>George2</name></author>	</entry>

	<entry>
		<id>https://wiki.twig.es/index.php?title=Checking_the_password_using_hashes_and_salt&amp;diff=4246&amp;oldid=prev</id>
		<title>George2: Created page with &quot;&lt;source lng=&quot;php&quot;&gt;  $check = hash('md5', $salt.$_POST['pass']); $stmt = $pdo-&gt;prepare('SELECT user_id, name FROM users     WHERE email = :em AND password = :pw'); $stmt-&gt;execu...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.twig.es/index.php?title=Checking_the_password_using_hashes_and_salt&amp;diff=4246&amp;oldid=prev"/>
				<updated>2018-12-08T10:38:24Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;source lng=&amp;quot;php&amp;quot;&amp;gt;  $check = hash(&amp;#039;md5&amp;#039;, $salt.$_POST[&amp;#039;pass&amp;#039;]); $stmt = $pdo-&amp;gt;prepare(&amp;#039;SELECT user_id, name FROM users     WHERE email = :em AND password = :pw&amp;#039;); $stmt-&amp;gt;execu...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source lng=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$check = hash('md5', $salt.$_POST['pass']);&lt;br /&gt;
$stmt = $pdo-&amp;gt;prepare('SELECT user_id, name FROM users&lt;br /&gt;
    WHERE email = :em AND password = :pw');&lt;br /&gt;
$stmt-&amp;gt;execute(array( ':em' =&amp;gt; $_POST['email'], ':pw' =&amp;gt; $check));&lt;br /&gt;
$row = $stmt-&amp;gt;fetch(PDO::FETCH_ASSOC);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if ( $row !== false ) {&lt;br /&gt;
    $_SESSION['name'] = $row['name'];&lt;br /&gt;
    $_SESSION['user_id'] = $row['user_id'];&lt;br /&gt;
    // Redirect the browser to index.php&lt;br /&gt;
    header(&amp;quot;Location: index.php&amp;quot;);&lt;br /&gt;
    return;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>George2</name></author>	</entry>

	</feed>