Anonymous user
SQL-based authentication: Difference between revisions
m
format SQL as SQL
(Added Java version) |
m (format SQL as SQL) |
||
Line 5:
* Create user/password records in the following table (<tt>create_user</tt>)
* Authenticate login requests against the table (<tt>authenticate_user</tt>)
This is the table definition:
-- a string of 16 random bytes
);</lang>
(<tt>pass_salt</tt> and <tt>pass_md5</tt> would be <tt>binary(16)</tt> values, but MySQL versions before 5.0.15 strip trailing spaces when selecting them.)
=={{header|C}}==
{{libheader|mysqlclient}} (MySQL client library)
{{libheader|OpenSSL}} (for MD5)
<lang c>#include <stdio.h>
#include <stdlib.h>
|